Closed Bug 441255 Opened 17 years ago Closed 17 years ago

rendering a table inside a div with 100% width and scrolling bar

Categories

(Core :: Layout, defect)

x86
Windows XP
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 409736

People

(Reporter: sigitm, Unassigned)

References

()

Details

Attachments

(4 files)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; it; rv:1.9) Gecko/2008052906 Firefox/3.0
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; it; rv:1.9) Gecko/2008052906 Firefox/3.0

I'm from Italy and I encountered a strange FF3 behaviour in rendering my html pages.
I have a very large table, dinamically generated, and I'd like to insert it inside a page with well defined margins (but this value can dinamically change at runtime).
I don't want the large table to deform the page, so I inserted it inside a div with 100% width and an horizontal scrollbar. In this way, the div occupies all the available space, and the table is contained in the div without deforming my page; I can see all the table data using the horizontal scrollbar provided by the div.

With FF2 and IE7 this works perfectly, but not with FF3: the scrollbar is grayed out and the table deforms all the div (and so my entire page).

I prepared an attached html semplified example, where I also inserted an external 600px div to "simulate" a page fixed width (because in the real page it's all inside a table cell, etc...).

Why doesn't it work in FF3? Is it a bug?
PS: If instead of a table I put a wide image inside the div, it works.

Reproducible: Always

Steps to Reproduce:
1. Inside a page with well defined margins (e.g. inside a table, or a fixed width div), insert a div with 100% width and an horizontal scrolling bar, in order to activate the scrolling bar if the content is larger.
2. Inside the div, put a very wide table

Actual Results:  
In FF3 you can see that the div doesn't respect its 100% relative width and deforms horizontally in order to view ALL the table cells.

Expected Results:  
The 100% width div should use all the available space (in my example, 600px given by an external div) and not more.
If the content is wider than the available space, the div should show only a fraction of it; to see the remaining parts, users should use the horizontal scrollbar provided by the div.
(you can see in FF2 the right behaviour)

I inserted as attachment my example file, and screenshots with common browsers.

I tried it with different computers (also with Linux Ubuntu) and the result is the same. So I know it's not a problem derived from my computer's configuration or the extensions I installed.
Attached file html example file
Attached image IE7 screenshot
Attached image FF3 screenshot
Attached image FF2 screenshot
As far as I can see the change here is the behavior of the fieldset.  It looks like the fieldset now shrink wraps its contents.  So the fieldset overflows its parent instead of the table overflowing its parent which was done before.  
Component: General → Layout: Form Controls
Product: Firefox → Core
QA Contact: general → layout.form-controls
This is due to the fix for bug 402567.
Be prepared for a WONTFIX.
Blocks: 402567
Fieldset always shrink-wrapped its content.  The only question is how big that content is, and as Martijn points out bug 402567 changed the answer to that question.
Component: Layout: Form Controls → Layout
QA Contact: layout.form-controls → layout
Ok so this is another example of propagating min-width up through "overflow" frames Correct?  WONTFIX is fine by me.
Status: UNCONFIRMED → RESOLVED
Closed: 17 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: