Hello guys! I want exactly to understand what is the margin and what is the padding?
What are the differences between them?
Who can detailedly explain me?
Thanks in advance...
2 replies to this topic
#1
Posted 14 March 2011 - 05:44 AM
|
|
|
#2
Posted 14 March 2011 - 06:12 AM
margin is the distance between objects or to the edge, padding is the distance from the object outline to its content
__________________________________________
I study Information Systems at Karlstad University when I'm not on CodeCall
I study Information Systems at Karlstad University when I'm not on CodeCall
#3
Posted 14 March 2011 - 08:05 AM
I think firebug demonstrates this rather nicely.
The inner most part is the content, then padding, then border, then margin.
If there is no bored the padding and margin appear to be the same, but aren't. I've found a few people got these mixed up when they started learning because of not using a border.
Here is a screenshot of a random div in firebug.
http://i51.tinypic.com/2mpjslg.jpg
The inner most part is the content, then padding, then border, then margin.
If there is no bored the padding and margin appear to be the same, but aren't. I've found a few people got these mixed up when they started learning because of not using a border.
Here is a screenshot of a random div in firebug.
http://i51.tinypic.com/2mpjslg.jpg
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users


Sign In
Create Account


Back to top










