CSS padding-block-start Property

Beginner
5 min read
Updated: Oct 2026
3 examples
Live preview

Definition and Usage

The padding-block-start property sets the inner padding on the block-start edge of an element. In a horizontal writing mode (the usual default), that maps to the physical top — like padding-top.

With a vertical writing-mode, it can map to left or right instead. It is one half of the padding-block shorthand (with padding-block-end). It is not inherited. The initial value is 0. Negative values are invalid.

Baseline · Widely available.

Not deprecated. Cross-browser since about January 2020. Prefer it over padding-top when writing mode may change.

Logical tip.

Use padding-block-start for space before the content on the block axis. Pair with padding-block-end when you need both sides separately.

CSS Syntax

syntax.css
padding-block-start: <length> | <percentage> | initial | inherit;

Same value types as padding-top / padding-bottom, but the side is logical. There is no auto.

Property Values

ValueDescriptionTry it
<length>Fixed size such as 1.5rem or 24pxTry it
<percentage>Percent of the containing block’s inline size (usually its width)Try it
With writing-modeShows how block-start maps when text flows verticallyTry it
Absolute lengthPixel value such as 24pxTry it
initialResets to 0Try it
inheritInherits from the parent elementTry it

How to Use padding-block-start

Think “inner space before the content in the writing flow,” not always “top.”

  1. Decide how much padding you want before the content on the block axis.
  2. Set padding-block-start with a non-negative length or percentage.
  3. Use padding-block-end if you also need space after the content.
  4. Test with writing-mode if orientation may change.
In horizontal-tbUsually maps to
padding-block-startpadding-top
padding-block-endpadding-bottom
padding-block: 1.5rem …First value sets this longhand

Live Preview

The amber area is padding. Change padding-block-start in a horizontal writing mode (block-start = top).

Amber = block-start padding. White dashed = content. Other sides stay at 0 here.

Box
Content

padding-block-start: 0

CSS Examples

Each snippet focuses on padding-block-start (plus writing-mode when needed). Use Try It Yourself for a live editor.

Example 1 — Length Value

A single length adds inner space on the block-start side only.

CSS
<style>
  .box {
    padding-block-start: 1.5rem;
    border: 1px solid #ccc;
  }
</style>

<div class="box">Padded content</div>
Try It Yourself

How It Works

  1. One side only. 1.5rem applies to block-start, not block-end.
  2. Horizontal default. That usually means the top edge.
  3. Other sides untouched. Bottom and inline paddings stay at their own values.
  4. Inside the border. Padding sits between content and border, unlike margin.

Example 2 — Percentage Value

Percentages resolve against the containing block’s inline size (usually width).

CSS
<style>
  .wrap { width: 280px; }
  .box {
    padding-block-start: 5%;
    border: 1px solid #ccc;
  }
</style>

<div class="wrap">
  <div class="box">5% block-start padding</div>
</div>
Try It Yourself

How It Works

  1. Reference width. 5% is based on the containing block’s inline size.
  2. Still block-start. The padding is added on the logical start side.
  3. Scales with container. Wider parents produce larger padding.
  4. Must be non-negative. Negative percentages are invalid, like negative lengths.

Example 3 — Vertical Writing Mode

Block-start follows the writing mode, not always the physical top.

CSS
<style>
  .box {
    writing-mode: vertical-rl;
    padding-block-start: 1.5rem;
    border: 1px solid #ccc;
  }
</style>

<div class="box">Vertical text</div>
Try It Yourself

How It Works

  1. Change the flow. writing-mode: vertical-rl makes lines run top to bottom.
  2. Block-start moves. It is no longer the physical top edge.
  3. Padding stays logical. padding-block-start still means “before” on the block axis.
  4. Why it matters. The same rule stays correct if the page switches writing mode later.

Edge Cases & Pitfalls

If the wrong side gets padding, writing mode or a physical longhand is usually why.

physical

Not always top

In horizontal writing it usually matches padding-top. In vertical writing it can match left or right. Use physical longhands only for a fixed screen edge.

rtl

RTL does not flip block-start

Direction affects the inline axis. In horizontal-tb, block-start stays top whether the text is LTR or RTL.

negative

Negative padding is invalid

Like all padding properties, negative lengths are not allowed. The declaration is ignored.

percent

Percentages use containing-block width

Percentage padding resolves against the containing block’s inline size (usually width), even on the block-start side.

override

Later physical padding can override

A following padding-top still wins for that physical side. Keep logical and physical rules from fighting each other.

Browser Support

padding-block-start is a browser CSS property for logical box spacing. Node.js, Deno, and Bun do not apply it.

✓ Baseline · Widely available

padding-block-start

Chrome 69+, Firefox 41+, Safari 12.1+, Edge 79+. Widely available since January 2020. Not in Internet Explorer.

97% Logical padding support
Google Chrome 69+
Full support
Mozilla Firefox 41+
Full support
Apple Safari 12.1+
Full support
Microsoft Edge 79+
Full support
Opera 56+
Full support
Samsung Internet 10.1+
Full support
Internet Explorer Not supported
Not supported
padding-block-start Widely supported

Bottom line: Safe for modern sites. For Internet Explorer, fall back to physical padding-top. It is not a runtime API.

Key Takeaways

  • Role: logical inner spacing on the block-start edge only.
  • Maps by writing mode: usually top in English; can be left/right in vertical text.
  • Shorthand partner: first value of padding-block; pair with padding-block-end.
  • Limits: no auto, no negatives; percentages use containing-block width.

One line: padding-block-start sets block-start padding that follows writing mode — use a non-negative length or percentage.

Frequently Asked Questions

It sets inner spacing on the block-start edge. In a horizontal writing mode, that is usually the top. The physical side can change with writing-mode.
The default is 0, so there is no block-start padding until you set one.
padding-top always means physical top. padding-block-start follows writing mode, so in vertical text it may map to left or right instead.
In horizontal writing modes, block-start stays the top. RTL affects the inline axis (left/right), not block-start. Block-start changes when writing-mode changes, such as vertical-rl.
Use it when you need inner space only before the content on the block axis and want that side to stay correct if writing mode may change.
It is Baseline and widely available in modern browsers since about January 2020 (Chrome 69+, Firefox 41+, Safari 12.1+). It is a browser CSS property, not a Node.js feature.

Next: padding-bottom

Learn physical bottom padding for a fixed screen edge.

padding-bottom tutorial →

About the author

Mari Selvan M P
Mari Selvan M P 🔗

Developer, cloud engineer, and technical writer

  • Experience 12 years building web and cloud systems
  • Focus Full Stack Development, AWS, and Developer Education

I write practical tutorials so students and working developers can learn by doing—from databases and APIs to deployment on AWS.

8 people found this page helpful