Padding - Individual Sides

div {
  padding-top: 50px;
  padding-right: 30px;
  padding-bottom: 50px;
  padding-left: 80px;
  • CSS has properties for specifying the padding for each side of an element: padding-top, padding-right, padding-bottom, padding-left.
  • All the padding properties can have the following values: length (specifies a padding in px, pt, cm, etc.), % (specifies a padding in % of the width of the containing element), inherit (specifies that the padding should be inherited from the parent element) .
  • Negative values are not allowed.

Related concepts

Padding - Individual Sides

Padding - Individual Sides — Structure map

Clickable & Draggable!

Padding - Individual Sides — Related pages: