I’m currently building a popup box script using css/jquery and i can’t seem to get the div centered on the screen on all cases. It it possible to center it without knowing the div width?
Instead of posting all the code here i put up a live example at http://goo.gl/N45cp
Any kind of help is much appreciated!
Best Regards
John
If the position of the
#childis notabsolute, you can set left and right margins toauto:Or if the position is
absoluteyou can try the following: