Details on the following page
http://www.w3school.com.cn/cssref/pr_pos_vertical-align.asp
I use the following
vertical-align:middle
The following is a direct copy of the site's content
Example
Align an image vertically:
img
{
vertical-align:text-top;
}
Browser support
All browsers support the vertical-align property.
NOTE: The property value "inherit" is not supported by any version of Internet Explorer (including IE8).
Definition and Usage
The vertical-align property sets the vertical alignment of the element.
illustrate
This property defines the vertical alignment of the inline element's baseline relative to the baseline of the line in which the element is placed. Negative length and percentage values are allowed to be specified. This lowers the element instead of raising it. In table cells, this property sets the alignment of the cell contents in the cell box.
Default: Inheritance: Version: JavaScript Syntax:baseline |
no |
CSS1 |
object.style.verticalAlign="bottom" |
possible values
Value descriptionbaseline | default. The element is placed on the baseline of the parent element. |
sub | Vertically aligns the subscript of the text. |
super | Vertically align the superscript of text |
top | Align the top of the element with the top of the tallest element in the row |
text-top | Align the top of the element with the top of the parent's font |
middle | Place this element in the middle of the parent element. |
bottom | Aligns the top of the element with the top of the lowest element in the row. |
text-bottom | Aligns the bottom of the element with the bottom of the parent element's font. |
length | |
% | Arranges this element using the percentage value of the "line-height" property. Negative values are allowed. |
inherit | Specifies that the value of the vertical-align attribute should be inherited from the parent element. |