What I Want From CSS3 - Part 3 | January 24, 2006
As you probably all know, the box model looks like this.

You start with the content area, then you have your padding and border, followed lastly by your margin. When debugging your code you can get an idea of how elements are interacting by giving them a border or a background colour. This will tell you what is happening with the space formed by the content area, padding and border, but gives you no information about the elements margins. There is simply no way to see what an elements margins are doing.
This is a big problem as margins can collapse with other margins, causing all kinds of weird and wonderful effects.

I think two new CSS features would be extremely useful. Firstly I’d like to be able to add a margin-outline to boxes in order to show exactly how their margins are interacting. Secondly, it would be great to have control over margin collapsing, in the same way as you can control table border collapsing. So you could turn on and off the collapsing behaviour by doing something like this:
body {margin-collapse: none;}
p {margin-collapse: collapse;}
Now that would be cool
Posted at January 24, 2006 4:03 PM
Feaverish said on January 24, 2006 4:59 PM
Xyle scope shows you the margins (and padding) for any given element when you click on that element. See this page for more details.