CSS border-inline-width attribute
- Previous Page border-inline-style
- Next Page border-left
Definition and Usage
border-inline-width
The attribute sets the border width of the element in the inline direction.
Note:To make border-inline-width
The attribute takes effect, it must be set border-inline-style
.
border-inline-width
The value of the attribute can be set in different ways:
If border-inline-width
The attribute has two values:
border-inline-width: 10px 50px;
- The border width at the start of the inline is 10px
- The border width at the end of the inline is 50px
If border-inline-width
The attribute has one value:
border-inline-width: 10px;
- The border width at the start and end of the inline is 10px
CSS border-inline-width
Attribute and CSS Attribute border-bottom-width
,border-left-width
,border-right-width
and border-top-width
Very similar, but border-inline-width
The property depends on the inline direction.
Note:and related CSS properties writing-mode
,text-orientation
and direction
Defines the inline direction. This affects the start and end positions of a line, as well as border-inline-width
The result of the property. For English pages, the inline direction is from left to right, and the block direction is downward.
Example
Example 1
Set the width of the border for the inline direction:
#example1 { border-inline-style: solid; border-inline-width: 10px; } #example2 { border-inline-style: dashed; border-inline-width: thin thick; }
Example 2: Combined with the writing-mode property
The position of the border at the beginning and end of the inline direction is affected by writing-mode
Property Affects:
div { border-inline-style: solid; writing-mode: vertical-rl; border-inline-width: 5px; }
Example 3: Combined with the direction property
The position of the border at the beginning and end of the inline direction is affected by direction
Property Affects:
div { direction: rtl; border-inline-width: 5px 15px; }
CSS Syntax
border-inline-width: medium|thin|thick|length|initial|inherit;
Property Value
Value | Description |
---|---|
medium | Specifies a medium border. Default value. |
thin | Specifies a thin border. |
thick | Specifies a thick border. |
length | Allows you to define the thickness of the border. See:CSS Units. |
initial | Sets this property to its default value. See initial. |
inherit | Inherits this property from its parent element. See inherit. |
Technical Details
Default Value: | medium |
---|---|
Inheritance: | No |
Animation Creation: | Supported. See:Animation-related Properties. |
Version: | CSS3 |
JavaScript Syntax: | object.style.borderInlineWidth="3px 10px" |
Browser Support
The numbers in the table represent the browser version that first fully supports this property.
Chrome | Edge | Firefox | Safari | Opera |
---|---|---|---|---|
87.0 | 87.0 | 66.0 | 14.1 | 73.0 |
Related Pages
Tutorial:CSS Border
Reference:CSS border Attribute
Reference:CSS border-inline Attribute
Reference:CSS border-inline-style attribute
Reference:CSS border-bottom-width Attribute
Reference:CSS border-left-width attribute
Reference:CSS border-right-width attribute
Reference:CSS border-top-width attribute
Reference:CSS direction property
Reference:CSS text-orientation attribute
Reference:CSS writing-mode attribute
- Previous Page border-inline-style
- Next Page border-left