CSS Padding-top Property
The padding-top property of css, is used to control the top-padding of elements.
The padding-top property of CSS is used to set the top-padding of a given element. All elements can have padding.
Possible Values
- auto (Default)
- Units of Measurement
Note: Negative values is not allowed for padding.
Example:
This example sets the top-padding to 1em for paragraphs, meaning that paragraphs will have a space of 1em from its top-edge to its content.
p {
padding-top: 1em;
}Inherited? NO!