🔔 Alert..!! Get 2 Month Free Cloud Hosting With $200 Bonus From Digital Ocean ACTIVATE DEAL

Centr is a lightweight jQuery plugin that centers any object to the middle of the screen. It is easy to use for both amateur and professional web developers. Centr works across mostly all browsers.

Plugins Web

Documentation

centr.js

----

Minimal jQuery plugin to center objects.

Getting Started

Getting started is simple: include jQuery, include Centr, then:

$('#object').centr(); // it's that easy

Usage

Centr contains a few options. You can center horizontal, center vertical, add a class & center the text.

center horizontal

$('#object').centr();
$('#object').centr({     axisX: true });

center vertical

$('#object').centr({     axisX: false,     axisY: true });

horizontal & vertical

$('#object').centr({     axisX: true,     axisY: true });

add class

$('#object').centr({     addClass: true // add class "centered" });

center the text

$('#object').centr({     textCenter: true });

Examples

Check my website for examples and more information: http://boeddo.com/centr

Support

Centr support almost every browser. That's great, huh?

Author

Centr is made by Quincy Kools.

License

Centr is licensed under the MIT License


You May Also Like