I am using this script to center my div horizontally and vertically.
When the page loads the div gets centered vertically, not horizontally until I resize the brows
I use this JQuery.center plugin to center my DOM elements. The code will be something like this:
$("#child").center()
The prior code will center relative to its direct parent, if you need to center relative to another parent, it will be:
$("#child").center($("#parent"))
There are customized options, if you need other form of centralization.