Padding

It is the space flanked by the content of an element and its borders. The various padding properties are

  • padding
  • padding-top
  • padding-right
  • padding-bottom
  • padding-left
Usually it is used to add space between the content and the border. The padding area is in the inside edge of the border and the outer edge of the content.  The padding property cannot be given a negative value and it has no collapsing.
The padding property is a shorthand property hence combines the padding-top, padding-right, padding-bottom and padding-left properties into a single property. It takes units of a length or a percentage as values and is used as
.top {
margin: 1em auto;
border: 1px solid #666; padding: 10px;
}

Go To- Certified CSS3 Developer Tutorial

Share this post
[social_warfare]
Border
Height and Width

Get industry recognized certification – Contact us

keyboard_arrow_up