CSS border-block-end-width
The border-block-end-width
property in CSS specifies the width of an element’s block-end border. The block-end side is determined by the element’s writing mode, directionality, and text orientation. This property allows developers to control the thickness of the block-end border using predefined keywords or specific length values.
Syntax of border-block-end-width
</>
Copy
border-block-end-width: medium | thin | thick | length | initial | inherit;
Values
Value | Description |
---|---|
medium | Specifies a medium width for the block-end border. This is the default value. |
thin | Specifies a thin width for the block-end border. |
thick | Specifies a thick width for the block-end border. |
length | Specifies the exact width of the block-end border using any valid CSS length unit (e.g., 2px , 1em , 5% ). |
initial | Sets the property to its default value (medium ). |
inherit | Inherits the value from its parent element. |
Default Value
medium
Examples for border-block-end-width
Using the CSS border-block-end-width Property
The following examples demonstrate how to use the border-block-end-width
property to set the width of the block-end border:
</>
Copy
/* Set block-end border width to medium (default) */
.element {
border-block-end-width: medium;
}
/* Set block-end border width to thin */
.element {
border-block-end-width: thin;
}
/* Set block-end border width to a specific length (5px) */
.element {
border-block-end-width: 5px;
}
/* Inherit the block-end border width from the parent */
.element {
border-block-end-width: inherit;
}
Example for a Thick Block-End Border
Below is an example demonstrating how to use border-block-end-width: thick;
to apply a thick border to the block-end side:
index.html
</>
Copy
<!DOCTYPE html>
<html lang="en">
<head>
<style>
.box {
width: 300px;
border-block-end-width: thick;
border-block-end-style: solid;
border-block-end-color: red;
}
</style>
</head>
<body>
<h2 class="box">Lorem Ipsum</h2>
</body>
</html>

Example for a Block-End Border of 10px
border-block-end-width: 10px;
</>
Copy
<!DOCTYPE html>
<html lang="en">
<head>
<style>
.box {
width: 300px;
border-block-end-width: 10px;
border-block-end-style: solid;
border-block-end-color: red;
}
</style>
</head>
<body>
<h2 class="box">Lorem Ipsum</h2>
</body>
</html>

Browser Support
The border-block-end-width
property is supported in modern browsers. Below is a compatibility table:
Browser | Version |
---|---|
Chrome | 69.0 |
Edge | 79.0 |
Firefox | 41.0 |
Safari | 12.1 |
Opera | 56.0 |