CSS padding-inline-end Property

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

Definition and Usage

The padding-inline-end property sets the inner padding on the inline-end edge of an element. In a horizontal left-to-right writing mode, that maps to the physical right — like padding-right.

With direction: rtl, it maps to the left. With a vertical writing-mode, it can map to top or bottom instead. It is one half of the padding-inline shorthand (with padding-inline-start). 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-right when direction or writing mode may change.

Logical tip.

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

CSS Syntax

syntax.css
padding-inline-end: <length> | <percentage> | initial | inherit;

Same value types as padding-left / padding-right, 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 direction: rtlShows how inline-end flips for right-to-left textTry it
Absolute lengthPixel value such as 24pxTry it
initialResets to 0Try it
inheritInherits from the parent elementTry it

How to Use padding-inline-end

Think “inner space after the content along the line,” not always “right.”

  1. Decide how much padding you want after the content on the inline axis.
  2. Set padding-inline-end with a non-negative length or percentage.
  3. Use padding-inline-start if you also need space before the content.
  4. Test with direction or writing-mode if the page may switch.
In horizontal-tb + LTRUsually maps to
padding-inline-endpadding-right
padding-inline-startpadding-left
padding-inline: … 1.5remSecond value sets this longhand

Live Preview

The amber area is padding. Change padding-inline-end in a horizontal LTR writing mode (inline-end = right).

Amber = inline-end padding (right in LTR). White dashed = content. Other sides stay at 0 here.

Box
Content

padding-inline-end: 0

CSS Examples

Each snippet focuses on padding-inline-end (plus direction when needed). Use Try It Yourself for a live editor.

Example 1 — Length Value

A single length adds inner space on the inline-end side only.

CSS
<style>
  .box {
    padding-inline-end: 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 inline-end, not inline-start.
  2. LTR default. That usually means the right edge.
  3. Other sides untouched. Left and block 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-inline-end: 5%;
    border: 1px solid #ccc;
  }
</style>

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

How It Works

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

Example 3 — RTL Direction

Inline-end flips with direction — it stays “after” the text.

CSS
<style>
  .box {
    direction: rtl;
    padding-inline-end: 1.5rem;
    border: 1px solid #ccc;
  }
</style>

<div class="box">نص عربي</div>
Try It Yourself

How It Works

  1. Flip direction. direction: rtl makes text flow right to left.
  2. End moves. Inline-end is now the physical left edge.
  3. Padding stays logical. 1.5rem still means after the content on the inline axis.
  4. Why it matters. The same rule works for LTR and RTL without rewriting left/right.

Edge Cases & Pitfalls

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

physical

Not always right

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

rtl

RTL does flip inline-end

In horizontal writing, inline-end is usually right in LTR and left in RTL. Prefer logical padding when both directions matter.

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 inline-end side.

override

Later physical padding can override

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

Browser Support

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

✓ Baseline · Widely available

padding-inline-end

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-inline-end Widely supported

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

Key Takeaways

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

One line: padding-inline-end sets inline-end padding that follows direction and writing mode — use a non-negative length or percentage.

Frequently Asked Questions

It sets inner spacing on the inline-end edge. In horizontal left-to-right writing, that is usually the right. The physical side can change with direction or writing-mode.
The default is 0, so there is no inline-end padding until you set one.
padding-right always means physical right. padding-inline-end follows direction and writing mode, so in RTL it maps to the left, and in vertical text it can map to top or bottom.
Yes. In horizontal writing, inline-end is usually right in LTR and left in RTL. That is the main reason to prefer logical inline padding for multilingual UI.
Use it when you need inner space only after the content on the inline axis and want that side to stay correct if direction or 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-inline-start

Learn the longhand for inline-start padding alone.

padding-inline-start 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