Tutorials

CSS 'border-block-width' Property Explained

  • Published
  • 1 min read
  • CSS
  • HTML
  • Web Design
CSS 'border-block-width' Property
In this article
  1. CSS 'border-block-width' Property Examples
  2. Browser Support For 'border-block-width' Property
  3. CSS Syntax of the 'border-block-width' Property
  4. Usage of the 'border-block-width' Property
  5. Property Values of the 'border-block-width' Property

The CSS 'border-block-width' property is a shorthand for specifying the width of an element's block-start and block-end borders. This logical property adjusts according to the document's writing mode, allowing for consistent border widths that align with the flow of content. It's beneficial in responsive and internationalized web designs, where the layout and direction of text may vary.

CSS 'border-block-width' Property Examples

See the Pen CSS 'border-block-width' Property by Webzstore (@webzstore) on CodePen.

The 'border-block-width' property enhances CSS's ability to create flexible, writing-mode-aware layouts, supporting the development of content that is accessible and visually consistent across different languages and writing systems.

Browser Support For 'border-block-width' Property

firefoxsafarichromemicrosoft edgeopera
66.014.187.087.073.0

CSS Syntax of the 'border-block-width' Property

border-block-width: medium | thin | thick | length | initial | inherit;

Usage of the 'border-block-width' Property

Use 'border-block-width' to set uniform widths for the borders at the start and end of the block flow within an element. This property simplifies defining border widths in a writing mode-aware manner, ensuring that designs remain flexible and adaptable across different languages and writing systems.

Property Values of the 'border-block-width' Property

  • Medium: Applies a medium thickness to both the block-start and block-end borders. This is the default value.
  • Thin: Applies a thin thickness to the borders.
  • Thick: Applies a thick thickness to the borders.
  • Length: Specifies the width of the borders using CSS length values (e.g., px, em).
  • Initial: Resets the 'border-block-width' to its default value (medium).
  • Inherit: The element inherits the 'border-block-width' from its parent element.

Share this article

Written by

Webzstore Team

Webzstore has helped businesses since 2010. Today, we bring websites, digital marketing and enquiry follow-up into practical plans built around the work each business needs.

Related services

Talk about your website or marketing

Book a Free 30-Minute Call

More tutorials

All tutorials

Privacy choices

Choose what this website may load. Your choice is saved on this device for up to 180 days. Privacy Policy

Turning a choice off stops further use of that optional service on this site. It does not take back information already sent, and we cannot delete cookies that other services set in your browser.