Files
freeCodeCamp/guide/english/css/properties/padding-property/index.md
Kowake 5c97c8884a Add "a" and "an" in line 6 (#23190)
"For a specific side of an element" is more grammatically correct than "for specific side of element".
2018-10-30 14:38:58 +05:30

944 B

title
title
Padding Property

Padding Property

CSS padding property adds internal space between the content and border of element. You may use padding-top, padding-right, padding-bottom and padding-left for a specific side of an element, but padding is shorthand version for all these properties. If:

  • One value is provided it will apply to all sides of element
  • Two values are provided, first value will apply top and bottom sides and second value will apply to left and right sides of element.
  • Three values are provided, first value will apply to top, second value will apply left and right, third value will apply bottom sides of element.
  • Four values are provided, values will apply in the following order: top, right, bottom, left.

More Information: