Name

padding-right

Synopsis

This property sets the width of the right padding for an element. Right padding set for an inline nonreplaced element will appear only on the right edge of the last inline box generated by the element. Negative padding values are not permitted.

Values:

<length> | <percentage> | inherit

Initial value:

0

Applies to:

all elements

Inherited:

no

Percentages:

refer to the width of the containing block

Computed value:

for percentage values, as specified; for length values, the absolute length

Note:

padding can never be negative

Get Cascading Style Sheets: The Definitive Guide, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.