Centering a div is very simple, you know the width and height of the div. Assuming your div has a width of 100 and 100 heights
div { position:absolute; left:50%; top;50%; margin-left:-50px; margin-top:-50px; }
if you are unsure of the size, then you can probably use the jquery method.
source share