HTML and CSS Reference
In-Depth Information
Figure 3.12: images and text vertically aligned in a table
In addition to the three values
top
,
middle
, and
bottom
that are applicable to
table elements, the
vertical-align
property can have an ofset value speciied
in ixed or relative units. For example:
span.upper
{ vertical-align: 10px; }
p.under
{ vertical-align: -1em; }
div.topper
{ vertical-align: 50%; }
he
vertical-align
property can also take one of the following keyword
values:
super
,
sub
,
text-top
, or
text-bottom
.
super
and
sub
move the text to
positions appropriate for superscripts and subscripts. hey should be equivalent
to the efects of using the
<sup>
and
<sub>
HTML elements.
text-top
and
text-
bottom
instruct the browser to align the top or bottom, respectively, of the text's
inline box with the top or bottom of the parent element's content area.
Every HTML block element has a set of box properties that deine the char-
acteristics of the rectangular area that element occupies on the web page.