CSS padding-right Property
Property definition and usage instructions
The padding-right property sets the right padding (space) of an element.
Note:Negative values are not allowed.
| Default value: | 0 |
|---|---|
| Inherited: | no |
| version: | CSS1 |
| JavaScript Syntax: | object.style.paddingRight="2cm" |
Browser Support
The numbers in the table specify the first browser version that fully supports the property.
| Property | |||||
|---|---|---|---|---|---|
| padding-bottom | 1.0 | 4.0 | 1.0 | 1.0 | 3.5 |
Property value
| Value | Description |
|---|---|
| length | Sets a fixed right padding value in specific units, such as pixels, centimeters, etc. The default value is 0px. |
| % | Defines a percentage-based right padding relative to the parent element's width. This value does not work as expected in all browsers. |
| inherit | Specifies that the right padding should be inherited from the parent element. |
Related Articles
CSS Tutorial:CSS Padding
other extensions