The padding-inline-end property sets inner spacing on the inline-end side of an element. In horizontal left-to-right writing, that is usually the right padding between content and the border.
The padding-inline-end property in CSS is used to define the padding at the end of an element’s inline direction.
This property is part of the logical properties in CSS, which allows for more flexible layouts that can adapt to different writing modes, such as left-to-right (LTR) or right-to-left (RTL) text directions.
Definition and Usage
Apply padding-inline-end when you need inner spacing on only the inline-end side and want that spacing to follow the inline axis instead of a fixed physical right edge. Use it for paragraphs, buttons with trailing icons, list items, and any component that needs extra room after the content along the inline direction.
Like regular padding, padding-inline-end increases the visible size of an element’s background and border box. It never collapses and always stays inside the element’s border.
💡
Beginner Tip
In LTR English, padding-inline-end: 20px; looks like right padding. In RTL, inline-end moves to the left side so spacing still follows the text flow.
LTR → inline-end is rightRTL → inline-end is left
Foundation
📝 Syntax
The syntax for the padding-inline-end property is simple. You can specify the padding using any valid CSS length value, including pixels, ems, percentages, and more.
syntax.css
element{padding-inline-end:value;}
Here, value can be a length (e.g., 10px, 1em, 5%) or a keyword like auto or inherit.
Apply padding-inline-end to any element that needs extra inner space on the inline-end side.
The value is a length, percentage, or keyword such as auto, initial, inherit, or unset.
The property is not inherited — child elements do not automatically get the parent’s inline-end padding.
Percentage padding is calculated relative to the inline size of the containing block.
Cheat Sheet
⚡ Quick Reference
Question
Answer
Initial value
0
Applies to
Inline-end padding side only
Inherited
No
Animatable
Yes, as a length
Common use
Paragraphs, buttons, list items, and RTL-aware trailing spacing
Defaults
🎯 Default Value
The default value of the padding-inline-end property is 0. This means that if no value is specified, there will be no padding applied at the end of the inline direction.
Reference
💎 Property Values
Value
Example
Description
Length
padding-inline-end: 10px;
Specifies a fixed padding, such as 10px, 1em, or 5%.
auto
padding-inline-end: auto;
The browser calculates the padding.
inherit
padding-inline-end: inherit;
Inherits the padding value from the parent element.
Four boxes with the same content and different pie- utility classes showing increasing inline-end inner spacing:
pie-sm
pie-md
pie-lg
pie-xl
Hands-On
Examples Gallery
Start with the reference paragraph example, try different inline-end values, add trailing spacing in components, and compare logical inline-end padding with physical right padding.
🔢 Basic padding-inline-end
Start with the reference example — inline-end padding on a paragraph with a light grey background.
Example 1 — Paragraph with Inline-End Padding
In this example, we’ll apply padding-inline-end to a paragraph element to add padding to the end of the inline direction.
padding-inline-end-example.html
<style>p{padding-inline-end:20px;background-color:lightgrey;}</style><p>
This paragraph has padding at the inline end. In LTR, that is extra space on the right.
</p>
This paragraph has padding at the inline end. In LTR, that is extra space on the right.
How It Works
The grey background fills the padding area, so the 20px gap appears between the content and the border on the inline-end side. In horizontal LTR, that is the right edge.
Example 2 — Different Inline-End Values
Use rem units for scalable inline-end spacing that grows with root font size.
Each class sets a different inline-end padding while leaving inline-start unchanged. The background fills the padding area so you can compare the spacing visually.
🛠 Layout Patterns
Apply inline-end padding to components and compare logical vs physical properties.
Example 3 — Button with Trailing Icon Space
Add inline-end padding to a button so text does not crowd a trailing icon or arrow.
In horizontal LTR English, both approaches look the same. padding-inline-end stays correct when text direction changes to RTL; physical right padding does not.
Companion
padding-inline-end vs padding-inline, padding-right & inline-start
The padding-inline shorthand sets both inline-start and inline-end padding in one declaration. Use padding-inline-end when you need spacing on only the inline-end side.
padding-right always targets the physical right edge. Pair padding-inline-end with padding-inline-start for full per-edge inline-axis control, or use padding for physical four-side shorthand.
padding-inline-end-companion.css
/* Inline-end only */.label{padding-inline-end:1rem;}/* Both inline sides via shorthand */.card{padding-inline:1.25rem0.75rem;}/* Physical fallback for older browsers */.legacy-label{padding-right:1rem;}
A11y
♿ Accessibility
Improve readability — Text benefits from inline-end padding so content does not crowd the trailing border edge.
Respect text direction — Logical inline-end padding keeps spacing correct for RTL and multilingual users.
Size touch targets — Buttons with trailing icons need comfortable inline-end padding for easy tapping.
Do not hide content — Very large inline-end padding on small screens can squeeze readable text area.
Test zoomed layouts — Users who zoom in rely on comfortable padding to keep text readable.
🧠 How padding-inline-end Works
1
The browser finds inline-end
Text direction decides which physical edge is inline-end. In LTR, that is the right edge; in RTL, it is the left edge.
Text direction
2
You set a padding value
Write padding-inline-end: 20px; with a length, percentage, or keyword.
CSS rule
3
Browser adds space on inline-end
Padding is inserted between the content edge and the border on the inline-end side only.
Box model
=
▦
Targeted inline-end spacing
Content has breathing room after it along the inline axis without affecting inline-start.
Compatibility
Browser Compatibility
The padding-inline-end property is supported in most modern browsers, including the latest versions of Chrome, Firefox, Safari, Edge, and Opera. However, it is always a good practice to test your website across different browsers to ensure compatibility.
✓ Baseline · Modern browsers
Logical inline-end padding in today’s browsers
Chrome, Firefox, Safari, Edge, and Opera support padding-inline-end in current versions.
96%Modern browser support
Google Chrome69+ · Desktop & Mobile
Full support
Mozilla Firefox41+ · Desktop & Mobile
Full support
Apple Safari12.1+ · macOS & iOS
Full support
Microsoft Edge79+ · Chromium
Full support
Opera56+ · Modern versions
Full support
padding-inline-end property96% supported
Bottom line: Safe to use in modern projects. For older browsers, pair with padding-right as a fallback in LTR layouts.
Wrap Up
Conclusion
The padding-inline-end property is a useful tool for web developers looking to create flexible and adaptable layouts.
By using logical properties like padding-inline-end, you can ensure that your designs work well in different writing modes and text directions. Experiment with different values and see how this property can enhance the layout and readability of your web projects.
Use padding-inline-end for trailing spacing along the inline axis
Prefer rem or em for scalable inline-end spacing
Pair with padding-inline-start for per-edge inline control
Use logical properties in multilingual or RTL layouts
Provide padding-right fallback for legacy LTR browser support
❌ Don’t
Assume inline-end is always the right side in every layout
Confuse inline-end with block-end (bottom in horizontal writing)
Use excessive inline-end padding that breaks mobile layouts
Forget that percentage padding is based on inline size
Replace margin with padding-inline-end for outer spacing between elements
Summary
Key Takeaways
Knowledge Unlocked
Five things to remember about padding-inline-end
Use these points when spacing content on the inline-end side.
5
Core concepts
→01
Inline-End Only
One logical edge.
Purpose
002
Default 0
No spacing.
Default
RTL03
Text Direction
Right in LTR.
Axis
%04
Units
px, em, rem, %.
Values
pr05
Not padding-right
Logical vs physical.
Companion
❓ Frequently Asked Questions
The padding-inline-end property sets inner spacing on the inline-end side of an element. In horizontal left-to-right writing, that is usually the right padding between the content and the border.
The default value is 0, meaning no inline-end inner spacing is applied unless you set padding-inline-end explicitly.
padding-right always targets the physical right edge. padding-inline-end follows the inline axis, so it stays correct when text direction changes to RTL.
Yes. In LTR, inline-end is the right side. In RTL, inline-end becomes the left side because it follows the text flow, not a fixed physical edge.
Use padding-inline-end when you need spacing on only the inline-end side and want that spacing to follow logical CSS. It pairs well with padding-inline-start and the padding-inline shorthand.