Revision 24599 of vertical-align

  • Revision slug: CSS/vertical-align
  • Revision title: vertical-align
  • Revision id: 24599
  • Created:
  • Creator: DBaron
  • Is current revision? No
  • Comment /* Values */ convert to dl

Revision Content

{{template.CSSRef()}}

Summary

The vertical-align property sets the vertical alignment of an inline or table-cell element.

  • Inherited: No

Values

baseline
The element is placed on the baseline of the parent element
sub
Aligns the element as it was subscript
super
Aligns the element as it was superscript
top
The top of the element is aligned with the top of the tallest element on the line
text-top
The top of the element is aligned with the top of the parent element's font
middle
The element is placed in the middle of the parent element
bottom
The bottom of the element is aligned with the lowest element on the line
text-bottom
The bottom of the element is aligned with the bottom of the parent element's font
length n%
Aligns the element in a % value of the "line-height" property. Negative values are allowed

Examples

img {
	vertical-align: bottom;
}

Revision Source

<p> 
{{template.CSSRef()}}
</p>
<h3 name="Summary"> Summary </h3>
<p>The vertical-align property sets the vertical alignment of an inline or table-cell element.
</p>
<ul><li> Inherited: No
</li></ul>
<h3 name="Values"> Values </h3>
<dl><dt>baseline 	</dt><dd>The element is placed on the baseline of the parent element
</dd><dt>sub 		</dt><dd>Aligns the element as it was subscript
</dd><dt>super 		</dt><dd>Aligns the element as it was superscript
</dd><dt>top 		</dt><dd>The top of the element is aligned with the top of the tallest element on the line
</dd><dt>text-top 	</dt><dd>The top of the element is aligned with the top of the parent element's font
</dd><dt>middle		</dt><dd>The element is placed in the middle of the parent element
</dd><dt>bottom		</dt><dd>The bottom of the element is aligned with the lowest element on the line
</dd><dt>text-bottom 	</dt><dd>The bottom of the element is aligned with the bottom of the parent element's font
</dd><dt>length n%	</dt><dd>Aligns the element in a % value of the "line-height" property. Negative values are allowed
</dd></dl>
<h3 name="Examples"> Examples </h3>
<pre>img {
	vertical-align: bottom;
}
</pre>
Revert to this revision