The padding properties are used to generate space around content.

Padding is on the inside of block elements while margin is on the outside:

  • Use padding to move the contents away from the edges of the block.
  • Use margin to separate the block from things outside it.

Take a look at the following screenshot. Light blue area specifies 70px padding-top and light green specifies 70px margin-bottom.

Padding Properties

Padding TopvalueSets the left padding (space) of an element.
Padding RightvalueSets the right padding (space) of an element.
Padding BottomvalueSets the top padding (space) of an element.
Padding LeftvalueSets the bottom padding (space) of an element.
Was this article helpful?

Couldn't Find Your Answer?

Get quality customer support with our professional support team.

Create A Support Ticket
Live Editor