padding property
Description
CSS padding property represents space between the sides of content and the border areas. It increases the size of a box more than usual.
Negative values are not allowed.
Syntax
padding :+ve length
Property values
length Default
-
There is no space between the side borders and the content area.
padding: 0;
+ve length
-
There is 10px space between side borders and the content area. The size of box increases by 10px due to padding.
padding: 10px;
Applicable to
It applies to all elements other than internal table elements.
From web4college, the free CSS digger
#CSS digger
Was this article helpful?
padding property represents space between the sides of content and the border areas. It increases the height of a box more than usual.
▾