CSS PROPERTIES
Expand All|Collapse All
CSS AT-RULES
SPONSORED LINKS

CSS border-right-width Property

Topic: CSS3 Properties Reference« Prev|Next »

Description

The border-right-width CSS property sets the width of an element's right border individually. However in many cases the shorthand CSS properties like border-width or border-right are more convenient to use and preferable.

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

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

Syntax

The syntax of the property is given with:

border-right-width: 
thin | medium | thick | length | initial | inherit

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

  • p {
  •     border-style: solid;
  •     border-right-width: 15px;
  • }
 

Note:You must declare the border-style property before the border-bottom-width property. An element must have borders before you can set the width of the border, because the default value of the border-style property is none.


Property Values

The following table describes the values of this property.

Value Description
thin A thin border.
medium A medium border.
thick A thick border.
length A length value in px, pt, cm, em, etc. Negative values are not allowed.
initial Sets this property to its default value.
inherit If specified, the associated element takes the computed value of its parent element border-right-width property.

Browser Compatibility

The border-right-width 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.

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

 
Close

Your Feedback:

 

We would love to hear from you! Please say something.