Skip to content Skip to sidebar Skip to footer

Missing Margin Between Floating And Nonfloating Divs

I found that when I mix floated and nonfloated divs, margin of unfloated div is missing. HTML
Left
Right &l

Solution 1:

The problem you are running into is that a non floated element will ignore floated elements within the document flow. The margin is being applied, but since the non floated div does not recognize the floated one, its is relative to the edge of the page and not the floated div. You can read more about it here: http://spyrestudios.com/css-in-depth-floats-positions/


Post a Comment for "Missing Margin Between Floating And Nonfloating Divs"