This is a shorthand property which allows an author to specify
'border-top-color', 'border-right-color', 'border-bottom-color', and
'border-left-color' properties using a single property and value
notation (the values are given in this order separated by spaces.)
If one or more of the values are not present, the value for a missing
side is taken from the opposite side that is present. If only one
value is listed, it applies to all sides. If no border-color is
specified for an element's border, the value of the 'color' property
is used instead.
Allowed Values
inherit
CSS2
Type: Explicit
Description:
Explicitly sets the value of this property to that of the parent.
transparent
CSS2
Type: Explicit
Description:
The border is transparent (with any accompanying 'border-width' thickness)
- eg: elements below it shine through.
[color]
CSS1 | CSS2
| IE4B1 | N4B3
| O3.5
Type: Explicit
Description:
Sets the border to the indicated color value.
Syntax
Selector { border-width:
[color] {1,4} }
Example
Ext/Doc: em {
border-color: blue }
In-Line: <emSTYLE="border-color:
#ff0000 green">this is an emphasized
test</em>
Browser Peculiarities
Internet Explorer
4.0:
- This property does not apply to input TYPE=checkbox/radio fields
- Applying border properties to list items skews the normal placement
of the marker
4.0+:
- This property does not apply to inline elements.
- The default 'border-style' for form fields and tables/table cells
is not "none."
Netscape
4.0:
- Inline elements are turned into block elements when Border properties
are applied.
- Border properties have no effect on tables and table cells
- Border properties applied to form fields and images: creates a linefeed
after the element followed by a small box carrying the border property/value.
- Border properties applied to list items (LI) and DT/DD:
creates a small box carrying the border property/value, followed by
a linefeed, followed by the list item content.
- Border properties applied to list structures (OL/UL): causes the list
markers to be shown as small bullets, regardless of the 'list-style-type'
applied.
- Colors can not be independently set for each side using this property;
only the last value is used.
- Border properties applied to hyperlinks make the hyperlink unusable!
- Border styles applied to unclosed P element, nested inside a floating
element: all content after opening P element disappears.
- Reported elsewhere: Crash when border applied to unclosed P element
in table cell, while another table is nested in the cell (verified in
4.0x, NT but appears ok in 4.5x, 98)
Opera
3.5:
- Borders have no effect on images, tables, table cells and form fields.
- Colors can not be independently set for each side using this property;
only the first value is used.