+ 1
The difference between padding properity and margin preperity ?
Hi everybody, can you tell me please what is the difference between padding properity and margin preperity ?
2 Antworten
+ 5
They have some differences:
* Margin is outer space of an element, while Padding is inner space of an element.
* Margin is the space outside the border of an element, while Padding is the space that is inside the border of it.
* Margin can be value auto: margin: auto, but you can't give Padding the value of auto.
* Margin can give value of positive or negative (or zero), otherwise, Padding must be positive (or zero).
* In navigation bars or anchors (links) and other tags, Padding is a part of element that accepts changes. When you style an element, changes not happens to Margin, but the space that Padding has created will be change.
Tip: You can see these differences on some tags that you use to control other tags; like div and span, or section and article. Also is good to see changes in navigation bars.
+ 2
padding is inside the block and margin outside the block