border-right-color property
[This documentation is preliminary and is subject to change.]
Sets or retrieves the color of the right border of the object.
![]() |
Syntax
border-right-color:
<color>
Property values
- color
-
A Variant that specifies or receives one of the color names or RGB values in the Color Table.
CSS information
| Applies To | All elements |
|---|---|
| Media | visual |
| Inherited | no |
| Initial Value |
Standards information
- CSS 2.1, Section 8.5.2
Remarks
As of Microsoft Internet Explorer 5.5, this property applies to inline elements. With earlier versions of Windows Internet Explorer, inline elements must have an absolute position or layout to use this property. Element layout is set by providing a value for the height property or the width property.
Some browsers do not recognize color names, but all browsers should recognize RGB color values and display them correctly.
Examples
The following examples use the border-right-color attribute and the border-right-color property to specify the color of the right border.
This example uses a call to an embedded (global) style sheet to change the color of the right border from red to blue when an onmouseover event occurs.
Code example: http://samples.msdn.microsoft.com/workshop/samples/author/dhtml/refs/border-right-color.htm
<HEAD>
<STYLE>
TD { border-right-color: red;
border-width: 0.5cm; border-style: groove}
.blue { border-right-color: blue }
</STYLE>
</HEAD>
<BODY>
<TABLE BORDER>
<TR>
<TD onmouseover="this.className='blue'"
onmouseout="this.className=''">
<IMG src="sphere.jpg">
</TD>
</TR>
</TABLE>
This example uses inline scripting to change the color of the right border to blue when an onmouseover event occurs.
Code example: http://samples.msdn.microsoft.com/workshop/samples/author/dhtml/refs/borderRightColor.htm
<TD onmouseover="this.style.borderWidth='0.5cm';
this.style.borderRightColor='blue';">
See also
Build date: 3/14/2012
