Padding Properties

The padding property allows you to specify how much space should appear between the content of an element and its border

The values of the margin property are not inherited by the child elements. Remember that the adjacent vertical margins (top and bottom margins) will collapse into each other so that the distance between the blocks is not the sum of the margins, but only the greater of the two margins or the same size as one margin if both are equal.

  • The margin specifies a shorthand property for setting the margin properties in one declaration.
  • The padding-bottom specifies the bottom padding of an element.
  • The padding-top specifies the top padding of an element.
  • The padding-left specifies the left padding of an element.
  • The padding-right specifies the right padding of an element

div {
  padding-top: 50px;
  padding-right: 30px;
  padding-bottom: 50px;
  padding-left: 80px;

Learn All in Tamil © Designed & Developed By Tutor Joes