This property controls the color of the top border of an element's
rendering box. If no border-color is specified for an element's border,
the value of the 'color' property is used instead.
Allowed Values
inherit
[CSS2|CSS2.1]
[N6|O7|S1]
Type: Explicit
Description:
Explicitly sets the value of this property to that of the parent.
transparent
[CSS2|CSS2.1]
[N6|O7|S1]
Type: Explicit
Description:
The border is transparent (with any accompanying 'border-width' thickness)
- eg: elements below it shine through.
-moz-use-text-color
[N6]
Type: Explicit
Description:
This is a Netscape/Mozilla proprietary value which indicates that the current
text color (value of the 'color' property) be used for the border color.
Use of this value is not recommended.
[color]
[CSS2|CSS2.1]
[IE4|N6|O3.5|S1]
Type: Explicit
Description:
Sets the border to the indicated color value.
Example
Ext/Doc: div {
border-top-color: green }
In-Line: <divSTYLE="border-top-color:
#008000">this is a Green Test</div>
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+:
- The default 'border-style' for form fields and tables/table cells is not "none."
4.0-5.0:
- This property does not apply to inline elements.
5.5+:
- Beginning in 5.5 Beta 1, this property now applies to inline elements.
Opera
3.5:
- Borders have no effect on images, tables, table cells and form fields.