CSS margin/padding property values
A pixel isn't the only measurement unit that we can use for defining elements' values. All padding and margin properties can specify their values in:
- Length: You can use familiar pixels or points (pt), centimeters (cm), and other measurement units.
- Percentage (%): You specify a property in the percentage of the container's width.
- Global values: These values (
inherit
,initial
, orunset
) indicate how the padding and margin properties inherit values from the parent element or reset to their browser defaults.