blob: 91a7a2671e33d2dd4268fa513ed8197a02485d1f [file] [log] [blame]
<style>
div.negativemargintop { position: absolute; top: 20px; font: 14px/0 Ahem; color: green;}
#float { float:left; background-color: green; margin-top: 17px; font-size: 1.5em; }
#visible { height: 20px; width:40px; float:left; background-color: blue; }
</style>
The green box should be below the blue box.<br>
- .negativemargintop gets 30px clearance thanks to its negative margin-top of -10px.
- .negativemargintop then collapses its margins to -10px which pulls it up 10px to the bottom edge of the float.
- #float positions itself 17px below the top-border edge of .negativemargintop
https://bugs.webkit.org/show_bug.cgi?id=14664<br>
<div style="position:relative;">
<div id="visible"></div>
<div class="negativemargintop">
<div id="float">xx</div>
</div>
</div>