CSS padding-right Property

Description

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 value
0
Applies to
All elements
Inherited
No
Media
Visual
Computed value
<length> - the percentage as specified or the absolute length
Animatable
Yes
CSS Version
CSS1, CSS2, CSS3
JavaScript syntax
object.style.paddingRight

Syntax

Formal syntax: [ <length> | <percentage> ]

padding-right: 10px;
padding-right: 10%;

Values

  • <length>Specifies a positive fixed width.
  • <percentage>A percentage with respect to the width of the containing block.
  • inherit

Example

.class {
   padding-right: 10em;
}

Give it a Try

Click the button below to experiment with this property.

Give it a Try!

Browser Support

Desktop
Explorer Edge Chrome Firefox Opera Safari
412113.51
Tablets / Mobile
Android Chrome Firefox Opera Safari Samsung
≤37184Yes1Yes