1.0.0 • Published 4 years ago

html-centralize-js v1.0.0

Weekly downloads
4
License
MIT
Repository
github
Last release
4 years ago

centralize.js

A simple JavaScript library to help you centralize content in the center of your device's screen or HTML element/container.

NPM

You can install directly via NPM to your project folder.

npm install html-centralize-js

CDN

The CDN is updated after the release is made public. Always, check the GitHub page for the latest release.

Usage

The "centralize" class comes in handy if you ever need to centralize content in the center of your device's screen or HTML element/container.

How To Use

The centralize class applies a 100% width & height to its parent container and centralizes the content at the center of the screen. Here's a sample below...

<!DOCTYPE html>
<html>
<head>
  <link href="https://cdn.jsdelivr.net/gh/chigozieorunta/centralize.js/centralize.css" rel="stylesheet" type="text/css"/>
  <script src="https://cdn.jsdelivr.net/gh/chigozieorunta/centralize.js/centralize.js" type="text/javascript"></script>
</head>

<body>
  <section class="centralize">
    You are centralized!!!
  </section>
</body>
</html>