CSS border-block-end attribute
- Previous Page border-block-color
- Next Page border-block-end-color
Definition and usage
border-block-end
The properties are shorthand for the following properties:
CSS border-block-end
Definition and usage properties are shorthand for the following CSS properties:
border-leftborder-bottom
border-left,
border-right and
border-top border-block-end
The attribute is very similar, but
The attribute depends on the block direction.Note: writing-mode
Defines the block direction. This affects the starting and ending positions of the block and related CSS properties border-block-end
The result of the attribute. For English pages, the inline direction is from left to right, and the block direction is downward.
Instance
Example 1
Set the width, color, and style for the border at the end of the block direction:
div { border-block-end: 10px solid pink; }
Example 2: Combined with the writing-mode attribute
The position of the border at the end of the block direction is affected by writing-mode
The effect of the attribute:
div { writing-mode: vertical-rl; border-block-end: dotted blue; }
CSS syntax
border-block-end: border-block-end-width border-block-end-style border-block-end-color|initial|inherit;
Attribute value
Value | Description |
---|---|
border-block-end-width |
Specifies the border width at the end of the block direction for the element. The default value is "medium". |
border-block-end-style |
Specifies the border style at the end of the block direction for the element. The default value is "none". |
border-block-end-color |
Specifies the border color at the end of the block direction for the element. The default value is the current border color. |
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 none currentcolor |
---|---|
Inheritance: | No |
Animation creation: | Supported. See:Animation-related properties. |
Version: | CSS3 |
JavaScript syntax: | object.style.borderBlockEnd="pink dotted 5px" |
Browser support
The numbers in the table represent the browser version that first fully supports this property.
Chrome | Edge | Firefox | Safari | Opera |
---|---|---|---|---|
69.0 | 79.0 | 41.0 | 12.1 | 56.0 |
Related pages
Tutorial:CSS Border
Reference:CSS border attribute
Reference:CSS border-block attribute
Reference:CSS border-block-color attribute
Reference:CSS border-block-start-color attribute
Reference:CSS border-bottom-color attribute
Reference:CSS border-left-color attribute
Reference:CSS border-right-color attribute
Reference:CSS border-top-color attribute
Reference:CSS writing-mode attribute
- Previous Page border-block-color
- Next Page border-block-end-color