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.