Closed
Bug 477794
Opened 17 years ago
Closed 15 years ago
div with display:inline-table want to clear both sides
Categories
(Core :: Layout, defect)
Tracking
()
RESOLVED
INVALID
People
(Reporter: tristan, Unassigned)
References
()
Details
Attachments
(1 file)
|
1.01 KB,
text/html
|
Details |
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/525.19 (KHTML, like Gecko) Chrome/1.0.154.48 Safari/525.19
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.6) Gecko/2009011913 Firefox/3.0.6
div with display:inline-tables want to clear both sides.
this is not the behavior on all major browsers (IE7, Chrome).
look at the very significant layout difference on this page:
http://es.playa-dust.com/moderate/sets/72157613108780053.shtml
Reproducible: Always
Steps to Reproduce:
1. layout has two floating divs (right and left. in the next filling div, create another div with display:inline-table, in order to create a box with a frame (see example url)
2. on FF, it clear both sides, so this box goes under the right and left float divs.
3.
Actual Results:
does not look good. i could not find any way to produce a similar layout as the one obtained on IE7 and chrome.
Comment 1•17 years ago
|
||
It worked in Firefox 2, although it reloaded the page in an irritating way.
It doesn't work anymore with Firefox 3 and later. Also Opera displays the images on the bottom.
Component: General → Layout
Product: Firefox → Core
QA Contact: general → layout
Version: unspecified → Trunk
Comment 2•17 years ago
|
||
(In reply to comment #1)
> although it reloaded the page in an irritating way.
It still does. The page gets blank for a split second.
It would be useful to have a testcase attached to the bug in case the page changes... and also preferably one that is simpler.
| Reporter | ||
Comment 4•17 years ago
|
||
is there another way to get a framed box in that div (with two float divs on the right and left)?
the only way i could find is by using inline-table. i tried using inline-block, but that does not work with FF and IE (it causes clearing, too). why would inline-block cause a clear???
in any case, inline-table works with IE and Chrome, so it would be nive if it could work with FF, too.
| Reporter | ||
Updated•17 years ago
|
Summary: div with display:inline-tables want to clear both sides → div with display:inline-table want to clear both sides
| Reporter | ||
Comment 5•17 years ago
|
||
> It still does. The page gets blank for a split second.
true. i can see the white flash (another bug?).
there is nothing in the javascript code of the page that should cause it to reload, AFAIK. there is on "onload:" in the body, for example.
| Reporter | ||
Comment 6•17 years ago
|
||
i'm gonna change the layout of this page so that it does not break on FF. it should not be hard for someone to make a test-case if needed.
Comment 7•17 years ago
|
||
reduced from url
Comment 8•17 years ago
|
||
IE8rc and Opera 9, Opera 10a display this the same as Gecko.
| Reporter | ||
Comment 9•17 years ago
|
||
good!
what is the expected behavior for display:inline-table? is it supposed to clear all the flaoting div's and take the full width?
i tried other display types, like table, table-cell and block, and in all cases the results were very different on the various browsers. is the css spec so bad that averyone interprets it differently???
| Reporter | ||
Comment 10•17 years ago
|
||
note that chrome seems to display it correctly, but when tou resize the width of the window, the box drops down and never get back up.
Comment 11•15 years ago
|
||
All major browsers have implemented the standard compliant rendering of the testcase.
inline-tables establish a block formatting context which is not allowed to be overlapping a float. When that would happen, the BFC is pushed below the float (as seen in the testcase).
Also, inline-tables are governed by the shrink-to-fit width. The available space is calculated without taking the float into account, so the width ends up greater than the space that's actually available (i.e. when taking the float into account). This eventually pushes the inline-table below the float, which is per spec.
Note that IE7 and Firefox 2 did not implement display: inline-table.
Status: UNCONFIRMED → RESOLVED
Closed: 15 years ago
Resolution: --- → INVALID
You need to log in
before you can comment on or make changes to this bug.
Description
•