Open main menu

CDOT Wiki β

Changes

CSS GUIDE VERTICAL ALIGN

No change in size, 13:12, 6 December 2006
Vertical aligning <div> element
== Syntax ==
===Vertical aligning <div> element=== *Mozilla cannot do vertical-align for a <&lt;div> &gt; element.
*The only way to get mozilla to put something in the middle of a containing box vertically is to use a table cell or set the padding top and bottom to be equal or to make the line-height equal to the height of the containing box and then use vertical-align: middle (this last way required the content to be only a single line).
*The reason for this is that the vertical-align attribute only considers the alignment within the current line, not within the containing box.
1
edit