html - Why don't diametrically opposed margins overlap with a table being involved? -


I wonder if the opposing margins (margin-down) after the two block elements (such as Divis) A margin-top is merged, while adding those margins between a block element and a table.

Example:

  & lt; Style & gt; . A {margin-down: 18px; }. B {margin-top: 6px; } & Lt; / Style & gt; & Lt; Div class = "a" & gt; Foo & lt; / Div & gt; & Lt; Div class = "b" & gt; Bar & lt; / Div & gt; ... & lt; Table class = "a" & gt; ... & lt; / Table & gt; & Lt; Div class = "b" & gt; Bar & lt; / Div & gt;  

Please note: If I change the property of the table to "block" then it behaves like any other block elements and their margins are merged.

This box model is named Crashing Margins and W3 states that


Comments

Popular posts from this blog

sql - dynamically varied number of conditions in the 'where' statement using LINQ -

asp.net mvc - Dynamically Generated Ajax.BeginForm -

Debug on symbian -