English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
border-right-How to use the width CSS attribute to set the width of the right border of an element separately. However, in many cases, like border-widthorborder-right Such shorthand CSS attributes are more convenient and preferable to use.
The following table provides usage instructions and version history of this attribute, as well as the syntax of using this attribute in JavaScript scripts.
Default Value: | medium |
---|---|
Applicable To: | All Elements |
Inheritance: | No |
Animated: | Yes.Please refer to Animation Attribute. |
Version: | CSS 1,2,3 |
JavaScript Syntax: | object.style.borderRightWidth="thick" |
The syntax of this attribute is as follows:
border-right-width: thin | medium | thick | length | initial | inherit
The following examples demonstrate how to use border-right-width attribute.
p { border-style: solid; border-right-width: 15px; }Test and see‹/›
Note:You must specify in border-bottom-width attribute was declared beforeborder-styleAttribute. The element must have a border before the border width can be set, because theborder-styleThe default value of the attribute is none.
The following table describes the value of this attribute.
Value | Description |
---|---|
thin | Thin border. |
medium | Medium border. |
thick | Thick border. |
length | Length values in units such as px, pt, cm, em, etc., but negative values are not allowed. |
initial | Set this attribute to its default value. |
inherit | If specified, the associated element adopts its parent element's border-right-The value of width attribute. |
border-right-Browser Compatibility of width Attribute, the numbers in the table below represent the minimum version number of browsers that support this attribute; all mainstream browsers support this attribute.
|
Please refer to the following tutorials:CSS Border.
Related Attributes:border,border-width,border-right,border-right-color,
border-right-style.