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

jQueryCenter is a small yet useful jQuery plugin that allows to center an Html elements (like div, image, text, etc) horizontally, vertically and responsively, without writing any CSS rules.

centering

Documentation

Setup

	<script type="text/javascript" src="http://code.jquery.com/jquery-1.10.2.min.js"></script> /* Import jQuery */ 	 	<script type="text/javascript" src="center.js"></script> /* Import Plugin */ 	 	<script type="text/javascript"> 		jQuery(document).ready(function($) { 			$("#center").center(); /* $("center") ID centering element. */ 		}); 	</script> /* Init Plugin */ 

Bug

  • If the element has focus is the text then it must define its size in PX.

You May Also Like