The best CSS padding-right property Tutorial In 2024, In this tutorial you can learn Examples,Attribute definitions and instructions,Browser Support,Property Value,related articles,

CSS padding-right property

Examples

Setting the right part of a P element filling:

p
{
padding-right:2cm;
}


Attribute definitions and instructions

padding-right property is set to a right padding (space) elements.

Note: negative values are not allowed.

Defaults: 0
inherit: no
version: CSS1
JavaScript syntax: object .style.paddingRight = "2cm"


Browser Support

Figures in the table represent the first browser to support the version number of the property.

属性
padding-bottom 1.0 4.0 1.0 1.0 3.5

Property Value

value description
length Unit of specific provisions in the right padding fixed value, such as pixels, centimeters, and the like. The default value is 0px.
% Definition is based on the percentage of the width of the parent element within the right margin. This value does not work as expected, as in all browsers.
inherit The provisions margin should inherit from the parent element inside right.


related articles

CSS tutorial: CSS the Padding

CSS padding-right property
10/30