what are the differences between margin and padding.
Thanx
what are the differences between margin and padding.
Thanx
Padding is inside of the border, margin is outside. See the W3C Box model for details.
This blog post is much more readable, though :-)
Its always better you will learn your self instead of explaining what it is.
In firefox there is an addon called Firebug. Just create a sample DIV or Input element. Try to add padding and Margin to this. You can check what is changing.
For IE browser there is Developer toolbar. You have got lot of tools where you can see the live demo yourself.
The simplest defenition is ; padding is a space given inside the border of the container element and margin is given outside. For a element which is not a container, padding may not make much sense, but margin defenitly will help to arrange it.
When you pack something breakable to mail, you put padding around the item (content) to cushion it.
Then, just know the 'other one is space oustide the box' in this case margin.