I encountered an issue with difference in rendering an element, which is absolute positioned, containing another element inside negative margins, then inside another one with clearfix and lastly some floated element in it.
Test case: http://jsfiddle.net/u5Qat/
HTML:
<div class="absolute">
<div class="content">
Test
<footer><p class="clearfix"><span>Footer</span></p></footer>
</div>
</div>
CSS:
* {
box-sizing: border-box;
}
*:before, *:after {
box-sizing: border-box;
}
.clearfix:before,
.clearfix:after {
content: " ";
display: table;
}
.clearfix:after {
clear: both;
}
.absolute {
position: absolute;
left: 0;
top: 0;
border: 1px solid red;
}
.content {
padding: 0 50px;
}
footer p {
margin-top: 25px;
margin-bottom: -10px;
}
footer p span {
float: left;
}
I suppose Chrome renders it correctly (55px height) and Firefox incorrectly expands the absolute positioned element so that it covers the element with negative margins (65px height).
Screenshot:
Looks like the clearfix & float don't do good in this case?
edit: IMO the correct behavior is of Chrome (on the right), and Firefox is wrong.