The padding-right property of an element sets the padding space required on the right side of an element. The padding area is the space between the content of the element and it's border. A negative value is not allowed.

  • Initial value0
  • Applies toAll elements
  • InheritedNo
  • MediaVisual
  • Computed value<length> - the percentage as specified or the absolute length
  • AnimatableYes
  • CSS VersionCSS1, CSS2, CSS3
  • JavaScript
Formal syntax: [ <length> | <percentage> ]

padding-right: 10px;
padding-right: 10%;
  • <length>Specifies a positive fixed width.
  • <percentage>A percentage with respect to the width of the containing block.
  • inherit
.class {
   padding-right: 10em;

Click the button below to experiment with this property.

Give it a Try!


Last updated on 23rd March 2014 By Rene Spronk

View All CSS Properties

Errors? Please help to keep this list up to date, If you find any errors, please contact us, so that we can get them fixed.