Read CSS: The Definitive Guide, 3rd Edition Online
Authors: Eric A. Meyer
Tags: #COMPUTERS / Web / Page Design
This defines the vertical alignment of an inline element's baseline with respect
to the baseline of the line in which it resides. Negative length and percentage
values are permitted, and they lower the element instead of raising it. In table
cells, this property sets the alignment of the content of the cell within the cell
box.
baseline
|sub
|super
|top
|text-top
|middle
|bottom
|text-bottom
| inherit
baseline
Inline elements and table cells
No
Refer to the value ofline-height
for
the element
For percentage and length values, the absolute length; otherwise, as
specified
When applied to table cells, only the valuesbaseline
,top
,middle
, andbottom
are recognized
This specifies whether
the element box generated by an element is rendered. This means the element could
occupy the space it would ordinarily, but be completely invisible. The valuecollapse
is used in tables to remove columns or rows
from the table's layout.
visible
|hidden
|collapse
|inherit
inherit
All elements
No
As specified
This declares how whitespace within an element is handled during layout. The
valuespre-wrap
andpre-line
were added in CSS2.1.
normal
|nowrap
|pre
|pre-wrap
|pre-line
|inherit
normal
All elements (CSS2.1); block-level elements (CSS1 and CSS2)
No
As specified
This defines the width of
an element's content area, outside of which padding,
borders, and margins are added. This property is ignored for inline nonreplaced
elements. Negative length and percentage values are not permitted.
auto
|inherit
auto
Block-level and replaced elements
No
Refer to the width of the containing block
Forauto
and percentage values, as
specified; otherwise, an absolute length, unless the property does not apply
to the element (thenauto
)
This defines the amount
of whitespace to be inserted between words in an element. For the purposes of this
property, a "word" is defined as a string of characters surrounded by whitespace.
Length values create a modifier to the usual spacing between words; thus,normal
is synonymous with0
. Negative length values are permitted and will cause words to bunch
closer together.
normal
|inherit
normal
All elements
Yes
Fornormal
, the absolute length0
; otherwise, the absolute
length
This property sets the placement of a positioned element along the
z
-axis, which is defined as the axis that extends perpendicular
to the display area. Positive numbers are closer to the user, and negative numbers
are further away.
auto
|inherit
auto
Positioned elements
No
As specified
This property defines the layout model used in laying out the borders in a
tableāi.e., those applied to cells, rows, and so forth. Although the property applies
only to tables,
it is inherited by all the elements
within the table.
collapse
|separate
|inherit
separate
Elements with thedisplay
valuetable
orinline-table
Yes
As specified
In CSS2, the default value wascollapse
This specifies the
distance between cell borders in the separated borders model. The first of the two
length values is the horizontal separation, and the second is the vertical. This
property is ignored unlessborder-collapse
is set
toseparate
. Although the property only applies to
tables, it is inherited by all of the elements within the table.
inherit
0
Elements with thedisplay
valuetable
orinline-table
Yes
Two absolute lengths
This property is ignored unlessborder-collapse
value isseparate
This specifies the placement of
a table caption with respect to the table box. The
caption is rendered as though it were a block-level element placed just before (or
after) the table.
top
|bottom
top
Elements with thedisplay
valuetable-caption
Yes
As specified
The valuesleft
andright
appeared in CSS2 but were dropped from
CSS2.1 due to a lack of widespread support
This defines
the presentation of table cells that contain no content. If shown, the cell's borders
and background are drawn. This property is ignored unlessborder-collapse
is set toseparate
.
show
|hide
|inherit
show
Elements with thedisplay
valuetable-cell
Yes
As specified
This property is ignored unlessborder-collapse
value isseparate
This property specifies which
layout algorithm is used to lay out a table. The fixed layout algorithm is faster but
less flexible, while the automatic algorithm is slower but more reflective of
traditional HTML tables.
auto
|fixed
|inherit
auto
Elements with thedisplay
valuetable
orinline-table
Yes
As specified
This specifies the minimum number of text lines within the element that can be
left at the bottom of a page. This can affect the placement of page breaks
within
the element.
inherit
2
Block-level elements
Yes
As specified
This declares whether page breaks should be placed after an element. While it is
possible to force breaks withalways
, it is not
possible to guarantee prevention; the best an author can do is ask the user agent toavoid
inserting a page break if possible.
auto
|always
|avoid
|left
|right
|inherit
auto
Nonfloated block-level elements with aposition
value ofrelative
orstatic
No
As specified
Declares whether page
breaks
should
be placed before an element. While it is possible to force breaks withalways
, it is not possible to guarantee prevention; the
best an author can do is ask the user agent toavoid
inserting a page break if possible.
auto
|always
|avoid
|left
|right
|inherit
auto
Nonfloated block-level elements with aposition
value ofrelative
orstatic
No
As specified
This declares whether page breaks should be placed inside an element. Because an
element might be taller than a page box, it is not possible to guarantee prevention;
the best an author can do is ask the user agent toavoid
inserting a page break if possible.
auto
|avoid
|inherit
auto
Nonfloated block-level elements with aposition
value ofrelative
orstatic
Yes
As specified
This specifies the minimum number of text lines within the element that can be
left at the top of a page. This can affect the placement of page breaks within the
element.
inherit
2
Block-level elements
Yes
As specified