0 out of 5 rated this helpful - Rate this topic

border-right property

[This documentation is preliminary and is subject to change.]

Sets or retrieves the properties of the right border of the object.

CSS 2.1, Section 5.5.19

Syntax

border-right: [ width || style || <color> ]

Property values

A variable of type String that specifies or receives one or more of the following space-delimited values:

width

Any of the range of width values available to the border-left-width property.

style

Any of the range of style values available to the border-left-style property.

color

Any of the range of color values available to the border-left-color property.

CSS information

Applies ToAll elements
Mediavisual
Inheritedno
Initial Value

Standards information

Remarks

The border-right property is a composite property that sets the width, style, and color values for the right border of an object.

All individual border properties not set by the composite border-right property are set to their default values. For example, the default value for width is medium.

If a color is not specified, the text color is used.

For more information about supported colors, see the Color Table.

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.

Examples

The following examples use the border-right property and the border-right attribute to specify the composite properties.

This example uses a call to an embedded (global) style sheet to change the attributes of the right border when an onmouseover event occurs.

Code example: http://samples.msdn.microsoft.com/workshop/samples/author/dhtml/refs/border-right.htm


<HEAD>
<STYLE>
    TD { border-right-style:solid; border-width:0.3cm }
    .change { border-right-style:groove }
</STYLE>
</HEAD>
<BODY> 
<TABLE> 
<TR> 
    <TD onmouseover="this.className='change'" 
        onmouseout="this.className=''">
        <IMG src="sphere.jpg"></TD> 
</TR>
</TABLE>

This example uses inline scripting to change the attributes of the right border when an onmouseover event occurs.

Code example: http://samples.msdn.microsoft.com/workshop/samples/author/dhtml/refs/borderRight.htm


<TD onmouseover="this.style.borderRight='0.3cm groove yellow'">

See also

CSSStyleDeclaration
currentStyle
defaults
runtimeStyle
style
Reference
border
Other Resources
CSS Enhancements in Internet Explorer 6

 

 

Build date: 3/14/2012

Did you find this helpful?
(1500 characters remaining)
Community Content Add
Annotations FAQ