Front-end Tutorials

Front-end Tutorials

HTMLCSSSassJavaScriptReactJS
CMS Tutorials

CMS Tutorials

WordPress
Tutorials expand

CSS Properties

CSS border-block-end-style Property

Posted in CSS Tutorial
Updated on Oct 01, 2024
By Mari Selvan
👁️ 9 - Views
⏳ 4 mins
💬 1 Comment
CSS border-block-end-style Property

Photo Credit to CodeToFun

🙋 Introduction

The border-block-end-style property in CSS is used to define the style of the border on the block-end side of an element. In languages that are written top-to-bottom (like English), the block-end side corresponds to the bottom edge of the element.

This property is particularly useful in multi-directional layouts where the writing mode of text can vary. It provides a way to control the border style based on the logical flow of content rather than the physical layout.

💡 Syntax

The syntax for the border-block-end-style property is simple:

Syntax
Copied
Copy To Clipboard
element {
  border-block-end-style: style;
}

Here, style refers to the type of border you want to apply, such as solid, dashed, dotted, etc.

🎛️ Default Value

The default value of the border-block-end-style property is none, meaning no border is displayed by default.

🏠 Property Values

The border-block-end-style property accepts the following values:

ValueDescription
noneNo border is displayed.
solidA single solid line.
dashedA series of dashed lines.
dottedA series of dotted lines.
doubleTwo solid lines with some space between them.
grooveA 3D grooved border that appears as though it is carved into the page.
ridgeA 3D ridged border that appears as though it is coming out of the page.
insetA 3D inset border that makes the element appear embedded.
outsetA 3D outset border that makes the element appear raised.
hiddenThe same as none, but it still affects table layout.

📄 Example

In this example, we'll apply different styles to the block-end border of a div element.

index.html
Copied
Copy To Clipboard
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>CSS border-block-end-style Example</title>
  <style>
    .solid-border {
      border-block-end-style: solid;
      border-block-end-width: 4px;
      border-block-end-color: blue;
    }
  </style>
</head>
<body>
  <h1>Block-End Border Style Example</h1>
  <div class="solid-border">
    This `div` element has a solid block-end border.
  </div>
</body>
</html>

🖥️ Browser Compatibility

The border-block-end-style property is supported in most modern browsers, including the latest versions of Chrome, Firefox, Safari, Edge, and Opera. As with any CSS property, it's a good idea to test your design across different browsers to ensure compatibility.

🎉 Conclusion

The border-block-end-style property is a useful tool for controlling the appearance of the block-end border in your designs.

By using this property, you can create visually distinct elements that enhance the layout and design of your web pages, especially in multi-directional content flows. Experiment with different styles to find the look that best suits your design needs.

👨‍💻 Join our Community:

To get interesting news and instant updates on Front-End, Back-End, CMS and other Frameworks. Please Join the Telegram Channel:

Author

author
👋 Hey, I'm Mari Selvan

For over eight years, I worked as a full-stack web developer. Now, I have chosen my profession as a full-time blogger at codetofun.com.

Buy me a coffee to make codetofun.com free for everyone.

Buy me a Coffee

Share Your Findings to All

Subscribe
Notify of
guest
1 Comment
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
We make use of cookies to improve our user experience. By using this website, you agree with our Cookies Policy
AgreeCookie Policy