close
CSS Portal

CSS border-block-start Property

If this site has been useful, we’d love your support! Consider buying us a coffee to keep things going strong!
Image

Description

The CSS property border-block-start controls the border that appears on the element’s start edge along the block axis - in other words, the logical “block-start” border. As a logical longhand, it represents the same conceptual border you would set with a physical side such as top or left, but it is expressed relative to the element’s writing direction and block flow rather than fixed to a physical edge. This makes it useful when you want borders to adapt automatically to different writing modes and directions without changing multiple physical-side declarations.

Because it is a logical property, the actual physical edge that border-block-start corresponds to depends on the document’s writing mode and text direction. Its behavior is therefore tied to properties that influence writing flow: writing-mode (which determines the block and inline axes) and direction (which affects inline-start vs inline-end). Using logical borders helps maintain consistent visual structure across horizontal and vertical text, and across left-to-right and right-to-left contexts, without needing separate rules for each physical side.

border-block-start participates in the normal cascade and interacts with other border-related declarations. It can be set independently or be affected by logical shorthands such as border-block and by physical shorthands such as border; the usual cascade, specificity, and source order rules determine which declaration wins. It also works alongside image-based and table-specific border mechanisms - for example, effects from border-image or the table-focused border-collapse model may alter how that border is painted or combined with adjacent borders.

In terms of layout and rendering, the presence of a border-block-start border affects the element’s visual edge and participates in painting and hit-testing. It is not an inherited property - each element’s border is determined by its own rules - and it contributes to the overall box appearance and how adjacent elements visually relate. When designing responsive, internationalized, or rotated layouts, preferring logical properties like border-block-start simplifies maintenance and helps ensure the intended edge styling survives changes in writing mode or direction; it also ties into sizing behaviors and space calculations alongside concepts such as box-sizing.

Definition

Initial value
See individual properties
Applies to
all elements
Inherited
no
Computed value
See individual properties
Animatable
See individual properties
JavaScript syntax
object.style.borderBlockStart

Interactive Demo

Example of the Border
Block Start Property

Syntax

border-block-start: <border-block-start-width> <border-block-start-style> <border-block-start-color>

Values

  • <border-block-start-width>Specifies the width of the border
  • <border-block-start-style>Specifies the style of the border
  • <border-block-start-color>Specifies the color of the border

Example

<div class="container">
<h2>border-block-start examples</h2>
<div class="card card-default">
<p>Default writing mode (ltr): block-start is top</p>
</div>
<div class="card card-vertical">
<p>Vertical writing mode (vertical-rl): block-start is right</p>
</div>
</div>
:root {
    --accent: #2b8aef;
    --accent-vertical: #ef7b2b;
    --surface: #ffffff;
}
* {
    box-sizing: border-box;
}
body {
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
    background: linear-gradient(180deg, #f6fbff 0%, #ffffff 100%);
    padding: 32px;
    color: #0f172a;
}
.container {
    max-width: 680px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.card {
    background: var(--surface);
    padding: 16px;
    border: 1px solid rgba(15,23,42,0.06);
    border-radius: 8px;
}
.card-default {
    border-block-start: 6px solid var(--accent);
}
.card-vertical {
    writing-mode: vertical-rl;
    border-block-start: 6px solid var(--accent-vertical);
    padding: 12px;
}
.card p {
    margin: 0;
}

Browser Support

The following information will show you the current browser support for the CSS border-block-start property. Hover over a browser icon to see the version that first introduced support for this CSS property.

This property is supported by all modern browsers.
Desktop
Chrome
Edge
Firefox
Opera
Safari
Tablets & Mobile
Chrome Android
Firefox Android
Opera Android
Safari iOS
Samsung Internet
Android WebView
-

Last updated by CSSPortal on: 1st January 2026

If this site has been useful, we’d love your support! Consider buying us a coffee to keep things going strong!
Image