CSS PROPERTIES
Expand All | Collapse All
CSS AT-RULES

CSS border-right Property

Topic: CSS3 Properties ReferencePrev|Next

Description

The border-right CSS property sets the width, style, and color of the right border of an element. It is a shorthand property for setting the individual right border properties i.e. border-right-width, border-right-style, and border-right-color at once.

The following table summarizes the usages context and the version history of this property.

Default value: See individual properties
Applies to: All elements
Inherited: No
Animatable: Yes, See individual properties. See animatable properties.
Version: CSS 1, 2, 3

Syntax

The syntax of the property is given with:

border-right: 
[ border-right-width border-right-style border-right-color ] | initial | inherit

The example below shows the border-right property in action.

h1 {
    border-right: 5px dashed #ff0000;
}
p {
    border-right: 3px dotted #00ff00;
}

Property Values

The following table describes the values of this property.

Value Description
border-right-width Sets the width of the right border of an element.
border-right-style Sets the line style of the right border of an element.
border-right-color Sets the color of the right border of an element.
initial Sets this property to its default value.
inherit If specified, the associated element takes the computed value of its parent element border-right property.

Browser Compatibility

The border-right property is supported in all major modern browsers.

Browsers Icon

Basic Support—

  • Firefox 1+
  • Google Chrome 1+
  • Internet Explorer 4+
  • Apple Safari 1+
  • Opera 4+

Further Reading

See tutorial on: CSS Border, CSS3 Border.

Related properties: border, border-right-color, border-right-style,
border-right-width.

Bootstrap UI Design Templates Property Marvels - A Leading Real Estate Portal for Premium Properties