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

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!

Post comment

Links that you insert are not nofollowed, but will be removed by admins if they are considered spam.

[url=Absolute URL for page]TITLE[/url]

You should insert code boxes around code examples, which will be automatically syntax highlighted.

[code1 html|css|javascript|php|sql]Your Code Here[/code1]

You may want to read our Privacy Policy before submitting your comment.