I read my blog about padding margin today. Very useful, original link http://www.hicss.net/use-margin-or-padding/ (haiyu blog ).
Some other negative margin application blog: http://www.hicss.net/do-not-tell-me-you-understand-margin/,http://www.hicss.net/i-know-you-do-not-know-the-negative-margin/
Http://www.topcss.org /? P = 94
In order to better understand the situation, haiyu is set to padding and margin:
Margin is used to separate the spacing between elements and elements;
Padding is used to separate the spacing between elements and content;
Margin is used to separate la s because elements and elements are irrelevant;
Padding is used for the interval between elements and content, so that there is a "breathing distance" between content (text) and (Package) elements"
When to use margin:
When adding a blank space outside the border.
When no background (color) is required in the blank area.
The white space of the two boxes connected up and down, such as 15px +The margin of 20px will get the blank of 20px.
When to use padding:
When adding a blank space on the inside of border.
Blank space requiredWhen the background (color) is required.
The space between the two boxes that love to be connected must be equal to the time between the two.For example, 15px +20px
In the left-side navigation pane.