Read CSS: The Definitive Guide, 3rd Edition Online
Authors: Eric A. Meyer
Tags: #COMPUTERS / Web / Page Design
This defines the style for the left border of an element. The value must be
something other thannone
for any border to
appear. In CSS1, HTML user agents were only required to supportsolid
andnone
.
none
|hidden
|dotted
|dashed
|solid
|double
|groove
|ridge
|inset
|outset
|inherit
none
All elements
No
As specified
This sets the width
for the left border of an element, which will take effect only if the border's style
is something other thannone
. If the border style
isnone
, the border width is effectively reset to0
. Negative length values are not permitted.
thin
|medium
|thick
|inherit
medium
All elements
No
Absolute length;0
if the style of the
border isnone
orhidden
This shorthand property defines the width, color, and style of the right border of
an element. As withborder
, omission of a border
style will result in no border appearing.
[
|inherit
Not defined for shorthand properties
All elements
No
See individual properties (border-width
, etc.)
This property sets the color for the visible portions of the right border of an
element. Only a solid color can be defined, and the border's style must be something
other thannone
orhidden
for any border to appear.
transparent
|inherit
The value ofcolor
for the
element
All elements
No
If no value is specified, use the computed value of the propertycolor
for the same element; otherwise, as
specified
This defines the
style for the right border of an element. The value must be something other thannone
for any border to appear. In CSS1, HTML
user agents were only required to supportsolid
andnone
.
none
|hidden
|dotted
|dashed
|solid
|double
|groove
|ridge
|inset
|outset
|inherit
none
All elements
No
As specified
This sets the width for the right border of an element, which will only take
effect if the border's style is something other thannone
. If the border style isnone
, the
border width is effectively reset to0
. Negative
length values are not permitted.
thin
|medium
|thick
|inherit
medium
All elements
No
Absolute length;0
if the style
of
the border isnone
orhidden
This shorthand property can be used to set the styles for the overall border of an
element, or for each side individually. The value of any border must be something
other thannone
for the border to appear. In CSS1,
HTML user agents were only required to supportsolid
andnone
.
[none
|hidden
|dotted
|dashed
|solid
|double
|groove
|ridge
|inset
|outset
]{1,4} |inherit
Not defined for shorthand properties
All elements
No
See individual properties (border-top-style
, etc.)
HTML user agents are only required to supportsolid
andnone
; the rest of
the values (except forhidden
) may be
interpreted assolid
This
shorthand property defines the width, color, and style of
the top
border of an element. As withborder
, omission of
a border style will result in no border appearing.
[
|inherit
Not defined for shorthand properties
All elements
No
See individual properties (border-width
, etc.)
This property sets the color for the visible portions of the top border of an
element. Only a solid color can be defined, and the border's style must be something
other thannone
orhidden
for any border to appear.
transparent
|inherit
The value ofcolor
for the
element
All elements
No
If no value is specified, use the computed value of the propertycolor
for the same element; otherwise, as
specified
This defines the style for the top border of an element. The value must be
something other thannone
for any border to
appear. In CSS1, HTML user agents were only required to supportsolid
andnone
.
none
|hidden
|dotted
|dashed
|solid
|double
|groove
|ridge
|inset
|outset
|inherit
none
All elements
No
As specified
This sets
the width for the top border of an element, which will only take effect if the
border's style is something other thannone
. If
the style isnone
, the width is effectively reset
to0
. Negative length values are not permitted.
thin
|medium
|thick
|inherit
medium
All elements
No
Absolute length;0
if the style of the
border isnone
orhidden
This shorthand property can be used to set the width for the overall border of an
element or for each side individually. The width will take effect for a given border
only if the border's style is something other thannone
. If the border style isnone
, the
border width is effectively reset to0
. Negative
length values are not permitted.
[thin
|medium
|thick
|inherit
Not defined for shorthand properties
All elements
No
See individual properties (border-top-style
, etc.)
This property defines the offset between the bottom outer margin edge of a
positioned element and the bottom edge of its containing block.
auto
|inherit
auto
Positioned elements (that is, elements for which the value ofposition
is something other thanstatic
)
No
Refer to the height of the containing block
For relatively positioned elements, see Note; forstatic
elements,auto
; for length values, the corresponding absolute length; for
percentage values, the specified value; otherwise,auto
For relatively positioned elements, if bothbottom
andtop
areauto
, their computed values are both0
; if one of them isauto
, it becomes the negative of the other; if neither isauto
,bottom
will become the negative of the value oftop