WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED INVALID
15286
position:absolute causes div width to collapse
https://bugs.webkit.org/show_bug.cgi?id=15286
Summary
position:absolute causes div width to collapse
Anantha Keesara
Reported
2007-09-26 08:00:32 PDT
Specifying a style "position:absolute" on a div in Safari causes its width to collapse. FF and IE both keep the div width at 100% by default even when specifying absolute position.
http://help.improve.safari.googlepages.com/absolute_width_collapse_1.html
Another testcase:
http://help.improve.safari.googlepages.com/absolute_width_collapse_2.html
Attachments
Add attachment
proposed patch, testcase, etc.
mitz
Comment 1
2007-09-26 08:41:35 PDT
Looks like
bug 11946
again (see also
bug 15272
).
Robert Blaut
Comment 2
2008-03-09 13:31:54 PDT
It isn't a bug. Webkit and Firefox 3 correctly resolves width for position: absolute using "shrink to fit" method: "Calculation of the shrink-to-fit width is similar to calculating the width of a table cell using the automatic table layout algorithm. Roughly: calculate the preferred width by formatting the content without breaking lines other than where explicit line breaks occur, and also calculate the preferred minimum width, e.g., by trying all possible line breaks. [...] Then the shrink-to-fit width is: min(max(preferred minimum width, available width), preferred width)." [
http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-width
] Confirmed as an evangelism bug.
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