1
edit
Changes
→Vertical aligning <div> element
== Syntax ==
===Vertical aligning <div> element=== *Mozilla cannot do vertical-align for a <<div> > 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.
== Mozilla Recommended Values ==
[http://developer.mozilla.org/en/docs/CSS:vertical-align MDC document on vertical-align]
== Usage Examples ==
===top===
<pre>
</pre>
===text-top===
<pre>
</pre>
===middle===
<pre>
===bottom===
<pre>
</pre>
===text-bottom===
<pre>
</pre>
===length===
<pre>
/*Aligns the element in a % value of the "line-height" property. Negative values are allowed*/
img{vertical-align: 125%;}
</pre>