Mar
17
Margin and padding
March 17, 2008 | Leave a Comment
The difference between margin and padding in css can be a bit confusing.
Margin is the space outside an element, while padding is the space inside an element. To illustrate this I have posted this image, which should explain it quite well.
You cannot use negative values with padding, but with margins you can.


