CSS border-block-start-style Property

The border-block-start-style property sets the line style of an element's logical block-start border.

It controls whether the border appears solid, dashed, dotted, double, or in another supported style. The physical side affected depends on the element's writing mode. Unlike the border-block-start shorthand, this property changes only the border style, leaving its specified width and color unchanged.

border-block-start-style Syntax

selector {
  border-block-start-style: solid;
}

The property accepts one border style keyword or a CSS-wide keyword.

.solid-border {
  border-block-start-style: solid;
}
.dashed-border {
  border-block-start-style: dashed;
}
.dotted-border {
  border-block-start-style: dotted;
}
.double-border {
  border-block-start-style: double;
}
.no-border {
  border-block-start-style: none;
}

CSS-wide keywords are also supported:

.inherited {
  border-block-start-style: inherit;
}
.reset {
  border-block-start-style: initial;
}
.unset {
  border-block-start-style: unset;
}
.reverted {
  border-block-start-style: revert;
}
.layer-reverted {
  border-block-start-style: revert-layer;
}

The property accepts only one style value. To set both logical block border styles, use border-block-style.

Property Values

Value Description
none Displays no border. This is the initial value.
hidden Hides the border and suppresses competing borders in the collapsed table border model.
solid Displays a single continuous line.
dashed Displays a series of short line segments.
dotted Displays a series of dots.
double Displays two parallel lines separated by a gap.
groove Creates a recessed, carved appearance.
ridge Creates a raised, embossed appearance.
inset Creates an inward or sunken appearance.
outset Creates an outward or raised appearance.

The initial value is none. The property is not inherited, and changes between border styles use discrete animation rather than gradual interpolation.

Global keywords such as inherit, initial, unset, revert, and revert-layer are also accepted.

How It Works

The border-block-start-style property controls the appearance of one logical border. Its physical position depends on the element's writing mode.

Setting a Visible Border

.panel {
  border-block-start-width: 4px;
  border-block-start-style: solid;
  border-block-start-color: #1769aa;
}

This creates a 4-pixel solid blue border on the logical block-start side.

Changing an Existing Border Style

.panel {
  border-block-start: 4px solid #1769aa;
  border-block-start-style: dashed;
}

The second declaration changes the border from solid to dashed without modifying its specified width or color.

Styling Only One Block Side

.panel {
  border-block: 3px solid #1769aa;
  border-block-start-style: dotted;
}

The block-start border becomes dotted, while the block-end border remains solid.

Default Style

.panel {
  border-block-start-width: 4px;
  border-block-start-color: red;
}

Without a visible border style, the border does not appear. The initial style is none, which produces a used border width of zero.

Writing Modes and Border Mapping

Logical border properties follow the block axis defined by the element's writing mode.

Writing Mode Physical Block-Start Border
horizontal-tb Top
vertical-rl Right
vertical-lr Left
sideways-rl Right
sideways-lr Left

Horizontal Writing

.horizontal {
  writing-mode: horizontal-tb;
  border-block-start: 4px solid #1769aa;
  border-block-start-style: dashed;
}

The dashed border appears along the top edge.

Vertical Right-to-Left Writing

.vertical-right {
  writing-mode: vertical-rl;
  border-block-start: 4px solid #1769aa;
  border-block-start-style: dashed;
}

The dashed border appears along the right edge.

Vertical Left-to-Right Writing

.vertical-left {
  writing-mode: vertical-lr;
  border-block-start: 4px solid #1769aa;
  border-block-start-style: dashed;
}

The dashed border appears along the left edge.

Text Direction

.rtl-panel {
  direction: rtl;
  writing-mode: horizontal-tb;
  border-block-start: 4px solid #1769aa;
  border-block-start-style: dashed;
}

The border remains at the top. Changing direction alone does not change the block-start side in horizontal writing mode.

Common Border Styles

The most frequently used border styles are solid, dashed, dotted, and double.

Solid

.solid-example {
  border-block-start: 4px solid #1769aa;
}

A continuous line is useful for section accents, headings, and component borders.

Dashed

.dashed-example {
  border-block-start: 4px dashed #1769aa;
}

A dashed border creates a broken line suitable for decorative separators.

Dotted

.dotted-example {
  border-block-start: 4px dotted #1769aa;
}

A dotted border uses a sequence of dots. The exact dot shape and spacing can vary between browsers.

Double

.double-example {
  border-block-start: 6px double #1769aa;
}

A double border displays two parallel lines. The specified width includes both lines and the gap between them.

Very narrow double borders may not display two clearly separated lines, so a larger width is generally more suitable.

Three-Dimensional Border Styles

CSS also supports border styles that simulate depth using light and dark shading.

Groove

.groove-example {
  border-block-start: 8px groove #1769aa;
}

The border appears recessed into the surrounding surface.

Ridge

.ridge-example {
  border-block-start: 8px ridge #1769aa;
}

The border appears raised above the surrounding surface.

Inset

.inset-example {
  border-block-start: 8px inset #1769aa;
}

The border uses shading that suggests an inward edge.

Outset

.outset-example {
  border-block-start: 8px outset #1769aa;
}

The border uses shading that suggests an outward edge.

These styles depend on browser rendering and the specified border color. Their effects are more noticeable with thicker borders.

none and hidden

Both none and hidden suppress the visible border, but they behave differently when resolving collapsed table borders.

Using none

.no-border {
  border-block-start-width: 5px;
  border-block-start-style: none;
}

The specified width remains 5 pixels, but the used border width becomes zero because the style is none.

Using hidden

.hidden-border {
  border-block-start-width: 5px;
  border-block-start-style: hidden;
}

The border is not displayed, and its used width is also zero.

Collapsed Table Borders

table {
  border-collapse: collapse;
}
td {
  border: 2px solid #1769aa;
}
td.no-divider {
  border-block-start-style: hidden;
}

In the collapsed table border model, hidden takes precedence over competing borders and suppresses the shared border. The none style has the lowest precedence when resolving border conflicts.

For ordinary elements, both styles remove the visible border and produce a used width of zero.

Border Width and Color

The border style determines how a border is drawn, but its width and color are controlled separately.

Setting All Three Components

.panel {
  border-block-start-width: 5px;
  border-block-start-style: dotted;
  border-block-start-color: #1769aa;
}

This produces a 5-pixel dotted blue border on the logical block-start side.

Using the Shorthand

.panel {
  border-block-start: 5px dotted #1769aa;
}

The shorthand produces the same result using one declaration.

Changing Only the Style

.panel {
  border-block-start: 5px solid #1769aa;
}
.panel.decorative {
  border-block-start-style: double;
}

The decorative class changes the line style while preserving the specified width and color.

Using currentColor

.matching-border {
  color: #1769aa;
  border-block-start-width: 3px;
  border-block-start-style: dashed;
  border-block-start-color: currentColor;
}

The border uses the element's computed text color.

Using a Transparent Border

.transparent-border {
  border-block-start: 3px solid transparent;
}

The border retains its width and style but is not visibly painted. This can reserve space for later color changes.

The border-block-start-style property belongs to the family of logical border properties.

Property Purpose
border-block-start Sets the width, style, and color of the block-start border.
border-block-start-style Sets only the block-start border style.
border-block-start-width Sets the block-start border width.
border-block-start-color Sets the block-start border color.
border-block-end-style Sets the opposite logical block border style.
border-block-style Sets the styles of both logical block borders.
border-inline-style Sets the styles of both logical inline borders.

Different Styles on Both Block Sides

.panel {
  border-block-width: 4px;
  border-block-color: #1769aa;
  border-block-start-style: dashed;
  border-block-end-style: solid;
}

The block-start border is dashed, while the block-end border is solid.

Using border-block-style

.panel {
  border-block-width: 4px;
  border-block-color: #1769aa;
  border-block-style: dashed solid;
}

The first value sets the block-start style, and the second sets the block-end style.

Logical vs. Physical Styles

.logical {
  border-block-start-style: dashed;
}
.physical {
  border-top-style: dashed;
}

In horizontal writing mode, both properties target the top border. In vertical writing, the logical property follows the block-start side while the physical property remains on the top.

Shorthand and Longhand Interactions

Border shorthands can reset the block-start border style. The CSS cascade determines which declaration takes effect.

Overriding border-block-start

.panel {
  border-block-start: 4px solid #1769aa;
  border-block-start-style: dashed;
}

The later longhand changes the style to dashed.

Shorthand Reset

.panel {
  border-block-start-style: dashed;
  border-block-start: 4px solid #1769aa;
}

The later shorthand replaces the dashed style with solid.

Overriding border-block-style

.panel {
  border-block: 4px solid #1769aa;
  border-block-style: solid;
  border-block-start-style: dotted;
}

The block-start border becomes dotted, while the block-end border remains solid.

The border Shorthand

.panel {
  border-block-start-style: dashed;
  border: 2px solid gray;
}

The later border shorthand sets all four physical border styles to solid, overriding the earlier logical style.

Cascade Priority

These examples assume equal origin, importance, specificity, and cascade layer priority. A declaration with higher cascade priority can override a later declaration.

For consistent results, define general border rules first and apply specific logical style overrides afterward.

Practical Uses

Different border styles can help distinguish sections, headings, and component states.

Dashed Section Divider

.content-section {
  border-block-start: 2px dashed #8a99a8;
  padding-block-start: 20px;
  margin-block-start: 20px;
}

A dashed logical border separates sections without fixing the divider to the physical top edge.

Dotted Heading Accent

.section-heading {
  border-block-start: 4px dotted #1769aa;
  padding-block-start: 12px;
}

The dotted line adds a decorative accent to a heading.

Double Border Divider

.summary-section {
  border-block-start: 6px double #1769aa;
  padding-block-start: 16px;
}

A double border can visually separate a summary or concluding section.

Changing a Component State

.status-panel {
  border-block-start: 4px solid #1769aa;
}
.status-panel.pending {
  border-block-start-style: dashed;
}

The pending class changes the line style without changing its specified width or color.

For important status information, include descriptive text rather than relying only on the border appearance.

border-block-start-style Example

The following example displays four border styles in horizontal writing mode, followed by a dashed border in two vertical writing modes.

<div class="border-block-start-style-demo">
  <div class="demo-box solid">Solid</div>
  <div class="demo-box dashed">Dashed</div>
  <div class="demo-box dotted">Dotted</div>
  <div class="demo-box double">Double</div>
  <div class="demo-box vertical-right">vertical-rl</div>
  <div class="demo-box vertical-left">vertical-lr</div>
</div>
.border-block-start-style-demo {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 16px;
}
.border-block-start-style-demo .demo-box {
  box-sizing: border-box;
  inline-size: 160px;
  block-size: 100px;
  padding: 15px;
  border-block-start-width: 7px;
  border-block-start-color: #1769aa;
  background-color: #e8f2fb;
  color: #173b5e;
  font-weight: bold;
  text-align: center;
}
.border-block-start-style-demo .solid {
  border-block-start-style: solid;
}
.border-block-start-style-demo .dashed {
  border-block-start-style: dashed;
}
.border-block-start-style-demo .dotted {
  border-block-start-style: dotted;
}
.border-block-start-style-demo .double {
  border-block-start-style: double;
}
.border-block-start-style-demo .vertical-right {
  writing-mode: vertical-rl;
  border-block-start-style: dashed;
}
.border-block-start-style-demo .vertical-left {
  writing-mode: vertical-lr;
  border-block-start-style: dashed;
}
Browser Result
Solid
Dashed
Dotted
Double
vertical-rl
vertical-lr

The first four boxes demonstrate how the style keyword changes the appearance of the top border in horizontal writing mode.

The final two boxes use dashed with vertical writing modes. The border appears on the right in vertical-rl and on the left in vertical-lr.

All six examples use the same border width and color, making the differences in style and logical positioning easier to compare.

Important Considerations

Keep the following points in mind when using border-block-start-style:

  • Logical border style: The property controls the line style of the block-start border.
  • Initial value: The default value is none.
  • Inheritance: The property is not inherited.
  • Writing mode: The physical border affected depends on writing-mode.
  • Horizontal writing: The property normally controls the top border style.
  • Vertical writing: It controls the right border in vertical-rl and the left border in vertical-lr.
  • One style: The property accepts one border style keyword.
  • Common styles: solid, dashed, dotted, and double are frequently used.
  • Three-dimensional styles: groove, ridge, inset, and outset create shaded effects.
  • none and hidden: Both suppress the border, but hidden has special precedence in collapsed table border conflicts.
  • Used width: A border with style none or hidden has a used width of zero.
  • Width and color: This property does not change the specified border width or color.
  • Shorthand: Use border-block-start to set width, style, and color together.
  • Both block sides: Use border-block-style to set styles on both logical block borders.
  • Physical borders: Logical and physical style declarations may affect the same border depending on writing mode.
  • Shorthand resets: Later border shorthands can override the logical border style.
  • Animation: Changes between border styles are discrete rather than smoothly interpolated.
  • Browser rendering: Dashed, dotted, and three-dimensional border appearances may vary slightly between browsers.
  • Accessibility: Decorative border styles should not be the only indication of important content states.

Use border-block-start-style when the appearance of a logical block-start border needs to change without resetting its width or color.

Browser Support

The border-block-start-style property is widely supported in modern versions of Chrome, Edge, Firefox, Safari, and other major browsers.

The standard property does not require vendor prefixes. The exact rendering of dashed, dotted, and three-dimensional styles may vary between browsers.

Standard Declaration

.panel {
  border-block-start-width: 4px;
  border-block-start-style: dashed;
  border-block-start-color: #1769aa;
}

Physical Border Fallback

.panel {
  border-top: 4px dashed #1769aa;
}
@supports (border-block-start-style: dashed) {
  .panel {
    border-top: 0;
    border-block-start: 4px dashed #1769aa;
  }
}

This fallback assumes horizontal writing mode. Browsers supporting logical borders use the block-start border, while older browsers retain the physical top border.

For vertical writing modes, physical fallbacks must be adapted to the appropriate left or right side.

Visit Can I Use? to review current browser compatibility.

Specifications

The border-block-start-style property is defined in the CSS Logical Properties and Values Module Level 1 specification.

CSS Logical Properties and Values Module Level 1

General border style behavior is defined in the CSS Backgrounds and Borders Module Level 3 specification.

CSS Backgrounds and Borders Module Level 3