Percentage table widths inside auto width [ABS POS] block treated as minimum




Layout: Tables
17 years ago
3 years ago


(Reporter: Tony Gorman, Assigned: Bernd)



Windows 2000

Firefox Tracking Flags

(Not tracked)


(Whiteboard: [Hixie-P3], URL)


(1 attachment)



17 years ago
From Bugzilla Helper:
User-Agent: Mozilla/4.75 [en] (Windows NT 5.0; U)

Create absolutely positioned layer. Insert into it a table whose width has been 
set with a percent value, E.G. 100%. 

The layer collapses down to its smallest wrappable size instead of following the 

This does not occur if the table's width is set using pixels/non-percents or if 
the layer uses relative positioning.

Reproducible: Always
Steps to Reproduce:
1. create an absolutely positioned layer
2. insert a table into the layer
3. set the tables width using a percentage value

Actual Results:  The layer is collapsed down to smallest width the table can 

Expected Results:  It should render the layer to be same width as table

Comment 1

17 years ago
Confirming the bug with Win98 20001007. Renaming the summary, as this bug has
*nothing* to do with layers.
Ever confirmed: true
Summary: Table width=anyPercentValue inside an ABS POS layer is collapsed → Table width=anyPercentValue inside an ABS POS DIV is collapsed

Comment 2

17 years ago
Sorry. I was using "layer" in the general sense to describe a CSS-P element. 
Habit I've got into from working with DHTML in Netscape 4 and IE4+.

This bug has crept in recently, as it used to be OK in PR1. It developed some 
time after that...

Comment 3

17 years ago
This is still a problem on Mozilla Build 2001012205 Win32.

Comment 4

17 years ago
QA contact update
QA Contact: chrisd → amar

Comment 5

17 years ago
This bug is still lurking about and seems to have been forgotten. It is causing
a lot of problems with a few sites since it now seems to have changed behaviour
to be even worse. 

Up to now the content of a table whose width was set using percentages collapsed
down to the length of the available text wrap. Now it is collapsing down to its
smallest available state. 

Tables in Abs Pos DIV tags is a very common layout technique and this bug makes
it unusable as a design technique. For an example of the problem, look at
The bug is that the green <div> in the testcase given is getting sized to 0, 
when it should be getting sized just wide enough to contain the text. Note that
the green box should NOT span the width of the viewport as the testcase asserts.

amar, could you create a valid minimal testcase for this bug?
Keywords: css2, qawanted
Summary: Table width=anyPercentValue inside an ABS POS DIV is collapsed → Percentage table widths inside auto width [ABS POS] block treated as minimum
Whiteboard: [Hixie-P3]

Comment 7

17 years ago
This IS a valid test case. 

Either that or Netscape 4 IE4,5,6 and Mozilla up until about M8 are all wrong.

Comment 8

17 years ago
Why should the green box not span the width of the viewport?

Comment 9

17 years ago
Created attachment 41772 [details] [diff] [review]
untested patch ( e.g. regression test still needed)

Comment 10

17 years ago
The patch has passed the regression test, the code was already there, we asked 
for the width of the reflow state but did not use it, e.g. bypassed the column 
width balancing.  
Assignee: karnaze → bernd.mielke

Comment 11

17 years ago

Comment 12

17 years ago

Comment 13

17 years ago
fix checked in
Last Resolved: 17 years ago
Resolution: --- → FIXED

Comment 14

17 years ago
 Bernd, <div style="position:absolute> does not seem to work properly. Its not
extending the border to the width of the text.. instead its sizing to 0..

<div style="position:relative> is working good..



Comment 15

17 years ago
which build you are using? wfm win98 2001071704 trunk (I dont care about branch)

Comment 16

17 years ago
 Bernd, I was using Branch build when I reported my previous message.. I tested 
with trunk build its working fine..
win2000 Build ID# 2001-07-18-10-trunk
win98 Build ID# 2001-07-18-10-trunk
Marking verified
Keywords: qawanted
You need to log in before you can comment on or make changes to this bug.