Monday, June 21, 2010

Vertical Align in DIV

The container div must have these CSS properties:

display: table-cell;
vertical-align: middle;


and the child elements (img, div, span) must have only the vertical-align: middle; property.

Note: The container div mustn't have a float value!

No comments:

Post a Comment