Skip to content Skip to sidebar Skip to footer

Center Block Vertically And Horizontally With Dynamic Width And Height

I need to center an element both vertically and horizontally and the element can't have any fixed dimensions. The contents of the element must not be affected...meaning some elemen

Solution 1:

Here's a solution for centering DIVs vertically, with fallbacks for various browsers, including older IE versions.

http://www.jakpsatweb.cz/css/css-vertical-center-solution.html

[edit]

Translated, your fiddle becomes like this:

http://jsfiddle.net/GolezTrol/BUbmz/1/

Post a Comment for "Center Block Vertically And Horizontally With Dynamic Width And Height"