border-right-color (CSS property)
| IE5.5+ | FF1+ | Saf1.3+ | Op9.2+ |
|---|---|---|---|
| Buggy | Full | Full | Full |
| Inherited | Initial | Version |
|---|---|---|
| No | CSS1, 2.1 |
Example
This style rule assigns a blue color to
the right border of paragraphs within the element with ID
"example":
#example p {
border-right-color: blue;
border-right-style: solid;
}
Description
The property
border-right-color sets the color for the right border
of an element.
Borders are placed on top of the element’s background.
Value
This property
takes any valid CSS color value or color
keyword. The initial value for this property is the value of the
color property for the element.
The value transparent allows the
border to be transparent, but it will still occupy the space set by the
border-width property and allow the background of the
element to show through the transparent border.
Note that
a border will only be visible as long as a border-style
has been set. The default for border-style is
none, which means that no border will display, and
the border-width will be reset to zero.
Compatibility
| IE | 5.5 | Buggy |
|---|---|---|
| 6.0 | Buggy | |
| 7.0 | Buggy | |
| Firefox | 1.0 | Full |
| 1.5 | Full | |
| 2.0 | Full | |
| Safari | 1.3 | Full |
| 2.0 | Full | |
| 3.0 | Full | |
| Opera | 9.2 | Full |
| 9.5 | Full |
Internet
Explorer for Windows versions up to and including 6 do not support
transparent borders.
User agents are supposed to place borders on the
element’s background, but in Internet Explorer for Windows versions up to
and including 7, the background only reaches the inside edge of the border
when the element has a layout. This
means that for dotted or dashed
borders, the background won’t be visible through the spaces within the
border. When the element doesn’t have a layout, the background will extend
under the borders.
The appearance of the borders may vary between
user agents (within limits). The algorithms that define the relationship
between the colors used to achieve an effect (for example,
groove, ridge,
inset, and outset) are not
explicitly defined in the CSS specifications, so the colors may vary
between user agents. In CSS2.1, the three-dimensional border styles
(groove, ridge,
inset, and outset) depend on the
corresponding border-color, rather than on
color.
Internet Explorer for Windows versions up to and
including 7 don’t support the value inherit.
User-contributed notes
There are no comments yet.
Add a note
To post a note on this topic, please log in with your SitePoint username and password. If you don't have an account yet, you can create a new account for free.

