Closed Bug 311639 Opened 14 years ago Closed 6 years ago

CSS width on table cells not respected when table is squashed to fit window!

Categories

(Core :: Layout: Tables, defect)

x86
Windows XP
defect
Not set

Tracking

()

RESOLVED INVALID

People

(Reporter: deantrower, Unassigned)

Details

(Keywords: testcase)

Attachments

(1 file)

User-Agent:       Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; InfoPath.1)
Build Identifier: Firefox 1.0.7

Table cells are squashed below their minimum width (as set by CSS width or min-
width) when the table is automatically resized to fit the window.

This may be related or similar to bug 102847

Reproducible: Always

Steps to Reproduce:
1. Load the test case
2. Resize the window to be smaller than the table
3. Observe that the cells shrink!

Actual Results:  
Cells shrink

Expected Results:  
Cells should not shrink:  A horizontal scrollbar should appear for the browser 
window instead.
Attached file test case
Seems to work for me in the nightly trunk build (I can see the bug in
Mozilla1.7, though)
Reporter, please check again in the nightly trunk build:
http://ftp.scarlet.be/pub/mozilla.org/firefox/nightly/latest-trunk/
I'm just a regular user, not a developer, reporting a bug in the production 
version.  If the bug is fixed in the latest beta version, then great!
Dean, reporting bugs with that version1.0.7 has become nearly useless, since a
lot of bugs have been fixed since then (and other bugs have appeared).
Ok, I'm using the latest beta version to test bugs from now on.
This bug STILL OCCURS in Firefox 1.5 beta 2
Component: General → Layout: Tables
Keywords: testcase
Product: Firefox → Core
QA Contact: general → layout.tables
Version: unspecified → Trunk
Still occurs when using "Deer Park Alpha 2 version 1.6a1"
min-width is covered by bug 307866
Reduced testcase:
 data:text/html,<table border><td style="width: 60000px">Reporter expects this cell to be wider than browser

The reported buggy behavior is that the cell gets clamped at the available space (constrained by the browser-width), instead of getting its requested size and triggering a horizontal scrollbar (which is what the bug reporter expected, per comment 0).

It's been a while since I looked at table layout, but I think the actual behavior here is the intended behavior -- the table (which has "width: auto" by default) shrinkwraps its cells, but clamps its width to the available width, and if that means it needs to shrink its cells, it tries to do so equitably (based on the cells' intrinsic sizes).

Note that *if* you tweak my data URL to give the <table> itself a large specified width, then the cell size is no longer impacted by the browser size.

So I think this is INVALID, since the reported behavior is correct.

(Per comment 7, "min-width" should probably affect the behavior here, but that's covered in another bug, and the testcase didn't include "min-width" anyway.)
Status: UNCONFIRMED → RESOLVED
Closed: 6 years ago
Resolution: --- → INVALID
No longer depends on: 307866
Summary: CSS width and min-width styles on table cells not respected when table is squashed to fit window! → CSS width on table cells not respected when table is squashed to fit window!
You need to log in before you can comment on or make changes to this bug.