Closed Bug 178739 Opened 22 years ago Closed 20 years ago

TD does not fill all horizontal space in absolutely positionned table inside an abs. pos. div

Categories

(Core :: Layout: Tables, defect, P3)

x86
All
defect

Tracking

()

RESOLVED FIXED
Future

People

(Reporter: pascalc, Assigned: MatsPalmgren_bugz)

References

Details

(Keywords: testcase)

Attachments

(2 files)

Mozilla 2002110604 WinXP

1 create an absolutely positionned div
2 put an absolutely positionned table inside this div, one cell per row

expected result : the cell should fill the entire row
actual result : the cell is as wide as the content

I will attach a testcase.

There are many bugs about absolutely positionned tables but I could not find one
about side effects on <td>
OS: Windows XP → All
Whiteboard: DUPEME
According to CSS2 section 9.7, specifying 'position: absolute' changes the 
value of 'display' on the TABLE element from its normal value, 'table', to 'block':
http://www.w3.org/TR/CSS2/visuren.html#q24
This thus demonstrates a very obscure CSS2 bug related to the construction of
anonymous table objects (in particular, not following rule 3 in 17.2.1 correctly
by connecting adjacent rows
(http://www.w3.org/TR/CSS2/tables.html#anonymous-boxes ).

This has been changed in CSS 2.1 so that 'table' stays as 'table':
http://www.w3.org/TR/CSS21/visuren.html#q23
which means that this bug is definitely valid.

However, in order to stay compatible with almost-correct CSS2 implementations,
I'd recommend not absolutely positioning a table.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Setting the table to display block (tableA) has no ill effect on it. The
anonymous table seems to be generated. Setting the position to absolute
(tableB) of the table is OK, too.

In table C, the table cells look like they do in the attached photo -- too
narrow; not stretching to fill the table.

Table D looks fine but it is positioned as if tableC. the difference btn. table
C and table D: table D's containing block has width: 540px, whereas table C's
containing block has width: auto.


The tables are mispositioned. Table D is not positioned from its containing
block (the orange line that overlaps table c. Instead table d is positioned too
far down. 


1 create an absolutely positionned div
2 put an absolutely positionned table inside this div, one cell per row

Is the only way to reproduce the problem. It looks like the tables are breaking
out of their would be containing blocks. Weird.


(There is no opening HTML tag in testcase attachment 105381 [details]).
Priority: -- → P3
Target Milestone: --- → Future
still seeing the bug with build 2003070708
Blocks: 260172
Blocks: 204312
Blocks: 201001
Similar problem also occur when the outer DIV has position fixed

bug 260172 "wrong DIV width when {fixed} > TABLE{absolute} > DIV"
see attachment 159292 [details]
Assignee: core.layout.tables → mats.palmgren
Depends on: 201897
Keywords: testcase
Whiteboard: DUPEME
-> FIXED (by bug 201897)
Status: NEW → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: