The padding-right property sets the width of the padding area on the right of an element. That space sits between the content and the right border.
It always targets the physical right edge. For spacing that follows text direction, use padding-inline-end. To set all sides at once, use the padding shorthand.
Standard-track.
Not deprecated and not experimental. A long-standing CSS box-model property with universal browser support.
Default is zero. With 0, content sits against the right border.
Add a gap.2rem keeps space between content and the right edge.
Same border, different padding. Only the inner space changes.
Not margin. The outer position of the box stays the same; only the inside shifts.
Edge Cases & Pitfalls
Most padding bugs come from mixing it with margin or logical properties.
margin
Padding is inside; margin is outside
padding-right keeps content away from the right border. margin-right pushes the whole box away from its neighbor.
rtl
Physical right ignores text direction
In RTL layouts, padding-right still pads the right edge. Prefer padding-inline-end for end-of-text spacing.
negative
Negative values are invalid
Padding cannot be negative. Use a negative margin if you need to pull an element outward.
percent
Percentage uses the parent width
10% is 10% of the containing block’s width, not the element’s height.
box
box-sizing changes the total size
With border-box, right padding is included inside the declared width. With content-box, it adds outside the content width.
Compatibility
Browser Support
padding-right is a browser layout property. Node.js, Deno, and Bun do not apply it.
✓ Baseline · Widely available
padding-right
Length and percentage values work in all major browsers, including older Internet Explorer versions.
99%Common values
Google Chrome1+
Full
Mozilla Firefox1+
Full
Apple Safari1+
Full
Microsoft Edge12+
Full
OperaSupported
Full
Samsung InternetSupported
Full
Internet Explorer4+
Full
padding-rightWidely supported
Bottom line: Safe for everyday right padding in every current browser.
Remember
Key Takeaways
Role: add inner space on the physical right edge, between content and border.
Common values: lengths and percentages (never negative).
Initial value:0. Not inherited.
RTL tip: use padding-inline-end when spacing should follow text direction.
One line:padding-right is physical right inner space — always right, never negative.
Frequently Asked Questions
It sets inner spacing on the right edge of an element, between the content and the right border.
The initial value is 0. No right padding is added until you set a length or percentage.
padding-right adds space inside the border. margin-right adds space outside the border, between this element and its neighbor.
padding-right always targets the physical right edge. padding-inline-end follows writing mode and direction, so it stays on the end of the text flow in LTR and RTL.
Yes. A percentage is relative to the containing block's width (its inline size in horizontal writing). Values cannot be negative.
It is Baseline and widely available in all major browsers, including older Internet Explorer versions. It is a browser layout property, not a Node.js feature.