New! My 44-page ebook "CSS in 44 minutes" is out! 😃

Get it now →

#padding-right

Defines the space inside the element, on the right side.

default padding-right: 0;

Removes any padding on the right.

padding-right: 50px;

You can use pixel values.

padding-right: 7em;

You can use (r)em values.

The value is relative to the font size:

  • em: relative to the element's current font size
  • rem: relative to <html> the root element's font size

padding-right: 30%;

You can use percentage values.
The percentage is based on the width of the element.