A simple jQuery plugin to absolutely horizontally and vertically center an element within its parent
$(window).on("load resize",function(){
$('#targetElement').centerr();
});The browser width below which centerr won't adjust the target element
If true, don't set a value for left or margin-left
- You should add "display:none;" to the target element to avoid having it render before properly positioned.
- Make sure your target element's parent is relatively positioned.
Developed by Stephen Widom - http://stephenwidom.com