WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED DUPLICATE of
bug 79046
19123
An element with block formatting context adjacent to a floated block has phantom right margin.
https://bugs.webkit.org/show_bug.cgi?id=19123
Summary
An element with block formatting context adjacent to a floated block has phan...
Philippe Wittenbergh
Reported
2008-05-18 22:47:07 PDT
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
Attachments
testcase
(811 bytes, text/html)
2008-05-18 22:47 PDT
,
Philippe Wittenbergh
no flags
Details
testcase2
(772 bytes, text/html)
2008-05-19 06:11 PDT
,
Philippe Wittenbergh
no flags
Details
Test case showing float-overflow-margin bug
(933 bytes, text/html)
2009-12-16 07:50 PST
,
Jonas Munk
no flags
Details
View All
Add attachment
proposed patch, testcase, etc.
Philippe Wittenbergh
Comment 1
2008-05-18 22:47:53 PDT
Created
attachment 21225
[details]
testcase
Philippe Wittenbergh
Comment 2
2008-05-19 06:11:04 PDT
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)
mitz
Comment 3
2008-05-19 07:51:44 PDT
I think this is a duplicate.
Oded Arbel
Comment 4
2009-06-04 13:26:41 PDT
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.
Paranoid Android
Comment 5
2009-07-19 03:27:41 PDT
Same as
bug 22089
(which has a somewhat clearer test case).
Jonas Munk
Comment 6
2009-12-16 07:50:10 PST
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.
Darth
Comment 7
2011-01-29 20:59:29 PST
Similar downstream bug
http://code.google.com/p/chromium/issues/detail?id=69052
Dave Hyatt
Comment 8
2012-02-21 09:18:45 PST
*** This bug has been marked as a duplicate of
bug 79046
***
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug