The padding-right property

The padding-right property sets a right padding of an element. The property value is any size units.

Syntax

cssselector {
  padding-right: value;
}

Example

Let's make the 30px right padding:

html<div id="elem">
  some long text
</div>
css#elem {
  padding-right: 30px;
  width: 300px;
  border: 1px solid black;
  text-align: justify;
}

Результат:

See also

  • the padding-top property
    that sets a top padding
  • the padding-bottom property
    that sets a bottom padding
  • the padding-left property
    that sets a left padding
  • the padding property
    that is a shorthand for a padding
  • the margin property
    that sets a margin