mozilla

Revision 24597 of vertical-align

  • Revision slug: CSS/vertical-align
  • Revision title: vertical-align
  • Revision id: 24597
  • Created:
  • Creator: DBaron
  • Is current revision? No
  • Comment Stuff not about the vertical-align property doesn't belong in this article (certainly not in quantity).

Revision Content

{{template.CSSRef()}}

Summary

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

  • Inherited: No

Values

 Value		Description
 _____		___________

 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>
<pre> Value		Description
 _____		___________

 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
</pre>
<h3 name="Examples"> Examples </h3>
<pre>img {
	vertical-align: bottom;
}
</pre>
Revert to this revision