Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

border-right property

Specifies the properties of the right border of the object.

CSS Backgrounds and Borders Module Level 3, Section 4.4

Syntax

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

Property values

One or more of the following space-delimited values:

border-right-width

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

border-right-style

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

border-right-color

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

CSS information

Applies ToAll elements
Mediavisual
Inheritedno
Initial Value(see individual properties)

Standards information

Remarks

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

All individual border properties not set by the shorthand 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.

Examples

This example uses border-right to change border-right-width, border-right-style, and border-right-color for a div element.

An element styled using the border-right property


<body>
   <div class="right"></div>
</body>


div {
   border: 2px solid black;
   height: 50px;
   width: 50px;
}
.right {
   border-right: 2px dashed #00BFFF;
}

See also

CSSStyleDeclaration
currentStyle
defaults
runtimeStyle
style
Reference
border

 

 

Show:
© 2014 Microsoft