note:this file served as text/html to everyone except Gecko browsers and Opera7.5 (application/xhtml+xml). Opera 7.5 does some wacky things here: the distance between floatB and nonFloated div is always 75px in Opera... This file is served as text/html to everyone including Gecko browsers and Opera7.5. There is no difference in rendering.
test1
this floated block (floatA) has a margin of 25px on top and bottom
this floated block (floatB) has a margin of 25px on top and 50px on bottom
The distance between float A and floatB should be 50px — margins never collapse between floated blocks; this div has a margin of 25px set on bottom and 0 on top; it is not floated and is preceded by a clearing div with the following style: {height:0; font-size:1px; margin:0; clear:left;}; the clearing div contains a non breaking space ( ). The distance between this div and the (preceding) floated div floatB should be 50px.
test2
this floated block (floatA) has a margin of 25px on top and bottom
this floated block (floatB) has a margin of 25px on top and 50px on bottom
The distance between float A and floatB should be 50px — margins never collapse between floated blocks; this div has a margin of 25px set on bottom and 0 on top; it is not floated and is preceded by a clearing div with the following style: {height:0; font-size:1px; margin:0; clear:left;}; the clearing div is empty. The distance between this div and the (preceding) floated div floatB should be 50px a well.
test3
this floated block (floatA) has a margin of 25px on top and bottom
this floated block (floatB) has a margin of 25px on top and 50px on bottom
The distance between float A and floatB should be 50px — margins never collapse between floated blocks; this div has a margin of 25px set on top and bottom; it is not floated and is not preceded by a clearing div. The distance between this div and the (preceding) floated div floatB should be 50px a well.
Last modified: July 17 2004 02:53:05 GMT.