Posts Tagged ‘Vertical’

Vertical Centering with CSS

According to

CSS level 2 doesn’t have a property for centering things vertically. There will probably be one in CSS level 3. But even in CSS2 you can center blocks vertically, by combining a few properties. The trick is to specify that the outer block is to be formatted as a table cell, because the contents of a table cell can be centered vertically.

That page points to a horizontal and vertical centering example (which seems to be a common need):

To cater for various (mainly older) web browsers and peculiarities in CSS implementations, many vertical centering techniques have been developed. Here are some related links:

%d bloggers like this: