html-centralize-js
v1.0.0
Published
A simple JavaScript library to help you centralize content in the center of your device's screen or HTML element/container.
Downloads
3
Maintainers
Readme
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>