Tillitsdone
down Scroll to discover

CSS border-block-style Enhance Border Styles

Discover how the CSS border-block-style property enhances border styles for responsive web designs.

Learn about its use cases, available options, and how to apply it effectively.
thumbnail

Syntax

/* <'border-style'> values */
border-block-style: dashed;
border-block-style: dotted;
border-block-style: groove;
/* Global values */
border-block-style: inherit;
border-block-style: initial;
border-block-style: revert;
border-block-style: revert-layer;
border-block-style: unset;

Values

  • <'border-style'>:
    • none: No border.
    • hidden: Same as none, but used for border conflict resolution.
    • dotted: A series of dots.
    • dashed: A series of short dashes.
    • solid: A single, solid line.
    • double: Two solid lines.
    • groove: Appears to be carved into the page.
    • ridge: Opposite of groove.
    • inset: Appears to be embedded into the page.
    • outset: Opposite of inset.
  • Global values: inherit, initial, revert, revert-layer, unset.

Formal Definition

AttributeDescription
Initial valuenone
Applies toAll elements
InheritedNo
Computed valueAs specified
Animation typeDiscrete

Formal Syntax

border-block-style =
<'border-top-style'> {1,2}
<'border-top-style'> =
<line-style>
<line-style> =
none |
hidden |
dotted |
dashed |
solid |
double |
groove |
ridge |
inset |
outset

Examples

Example 1: Dashed Border with Vertical Text

HTML
<div>
<p class="exampleText">Example text</p>
</div>
CSS
div {
background-color: yellow;
width: 120px;
height: 120px;
}
.exampleText {
writing-mode: vertical-lr;
border: 5px solid blue;
border-block-style: dashed;
}
Results

The text is oriented vertically, and the border style is dashed, adapting to the vertical orientation.

Example 2: Solid Border with Dotted Style

HTML
<div>
<p class="exampleText">Example text</p>
</div>
CSS
div {
background-color: yellow;
width: 120px;
height: 120px;
}
.exampleText {
border: 5px dotted cyan;
border-block-style: solid;
background-color: purple;
}
Results

The border style is solid, overriding the initial dotted style.

Specifications

The border-block-style property is part of the CSS Logical Properties and Values Level 1 specification.

Specification
CSS Logical Properties and Values Level 1 # propdef-border-block-style

Browser Compatibility

The border-block-style property is widely supported across modern browsers:

  • Chrome: Version 87 and above
  • Edge: Version 87 and above
  • Firefox: Version 66 and above
  • Opera: Version 73 and above
  • Safari: Version 14.1 and above

For the most up-to-date information, refer to the Browser Compatibility Data (BCD) tables.

See Also

icons/css-4.svg CSS Blogs
CSS3 is the latest version of Cascading Style Sheets, offering advanced styling features like animations, transitions, shadows, gradients, and responsive design.
icons/logo-tid.svg

Talk with CEO

Ready to bring your web/app to life or boost your team with expert Thai developers?
Contact us today to discuss your needs, and let’s create tailored solutions to achieve your goals. We’re here to help at every step!
🖐️ Contact us
Let's keep in Touch
Thank you for your interest in Tillitsdone! Whether you have a question about our services, want to discuss a potential project, or simply want to say hello, we're here and ready to assist you.
We'll be right here with you every step of the way.
Contact Information
rick@tillitsdone.com+66824564755
Find All the Ways to Get in Touch with Tillitsdone - We're Just a Click, Call, or Message Away. We'll Be Right Here, Ready to Respond and Start a Conversation About Your Needs.
Address
9 Phahonyothin Rd, Khlong Nueng, Khlong Luang District, Pathum Thani, Bangkok Thailand
Visit Tillitsdone at Our Physical Location - We'd Love to Welcome You to Our Creative Space. We'll Be Right Here, Ready to Show You Around and Discuss Your Ideas in Person.
Social media
Connect with Tillitsdone on Various Social Platforms - Stay Updated and Engage with Our Latest Projects and Insights. We'll Be Right Here, Sharing Our Journey and Ready to Interact with You.
We anticipate your communication and look forward to discussing how we can contribute to your business's success.
We'll be here, prepared to commence this promising collaboration.
Frequently Asked Questions
Explore frequently asked questions about our products and services.
Whether you're curious about features, warranties, or shopping policies, we provide comprehensive answers to assist you.