An element that establishes a new block formatting context – overflow:hidden in testcase – (per CSS2.1:9.4.1), has a left-margin, and is adjacent to a left floated block, has a phantom margin on the right side, equivalent in width to its left-margin. Actual result: a 20px gap at the right of the element. Expected result: no gap. Compare rendering in (recent) Gecko 1.9 builds. tested with WebKit-SVN-r33561, Safari 3.1.1 and anything older Note: with a right floated element and a right-margin on the element with block formatting, the margin is applied between the float and element, contradicting CSS2.1:9.5
Created attachment 21225 [details] testcase
Created attachment 21227 [details] testcase2 for completeness' sake, a testcase with float:right and margin right on the main block. The margin-box should slide under the floated block (per CSS2.1:9.5)
I think this is a duplicate.
I think this is the same issue I have - a floated element causes the elements it floats next to, if they have both margin and overflow set to non-visible, to have a phantom right margin: http://geek.co.il/articles/webkit-margin-with-float-bug.html As the testcase in this URL shows, the phantom margin is sized according to the size of the floated element. I can reproduce this with all webkit installations (Safari/Win, Safari/MacOSX, Chrome/Win, Chromium/Linux and even Konqueror), including nightlies. Bug #22089 may also be related.
Same as bug 22089 (which has a somewhat clearer test case).
Created attachment 44977 [details] Test case showing float-overflow-margin bug Thought i might as well attach this test case since I already made it, hope it helps :-) This technique is very common so I would consider it to be fairly critical.
Similar downstream bug http://code.google.com/p/chromium/issues/detail?id=69052
*** This bug has been marked as a duplicate of bug 79046 ***