Closed Bug 164457 Opened 18 years ago Closed 14 years ago

Margin-left on a nested table makes it overflow the parent table

Categories

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

defect

Tracking

()

RESOLVED FIXED
Future

People

(Reporter: brian, Unassigned)

References

Details

(Keywords: testcase, Whiteboard: [reflow-refactor])

Attachments

(3 files)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.1b) Gecko/20020721
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.1b) Gecko/20020721

Text does not display when an a nested inner table uses cascading style sheets.
The inner table must be using an id and width attribute. A td element ithin the
nested table must be using an id attribute. I have supplied the exact code that
is breaking in the additional information section. My current build is 2002072104.

Reproducible: Always

Steps to Reproduce:
1.Load Page
2.
3.

Actual Results:  
Nothing is displayed.

Expected Results:  
The word DISPLAY to be present.

<html>
<head>
<style type="text/css">
#centerTextHeader {

	text-align : right;

}
#centerBody {

	margin-left : 40%;

}
</style>
</head>
<body>
	
<table>
	<tr>
		<td>
			<table id="centerBody" width="210">
				<tr>
					<td id="centerTextHeader">DISPLAY</td>
				</tr>
			</table>
		</td>
	</tr>
</table>

</body>
</html>
I am seeing this problem with the 2002-08-24 nightly.
I think this might be a dupe, but I can't find an earlier report, so I'm
confirming this. I'll try to trim down a slimmer testcase.
Status: UNCONFIRMED → NEW
Ever confirmed: true
This is simply the code the reporter provided, unmodified
bug also occurs with linux trunk build 20020824.

==> Layout
Assignee: asa → attinasi
Component: Browser-General → Layout
OS: Windows 2000 → All
QA Contact: asa → petersen
Attached file another testcase
the margin-left attribute bumps the inner table out of the outer table.  If
most of the text is outside the inner table, it is not displayed at all.
-> Karnaze
Assignee: attinasi → karnaze
Priority: -- → P2
Target Milestone: --- → Future
Reproduced in 11/21/02 Linux Trunk
Keywords: testcase
mass reassign to default owner
Assignee: karnaze → table
Component: Layout → Layout: Tables
QA Contact: petersen → madhur
Target Milestone: Future → ---
Target Milestone: --- → Future
This looks like it got fixed by bernd's overflow landing... at least I see all
the text paint in the testcases.
its visible es, but the inner table should not overflow the outer one.
Ah, ok.  Resummarizing accordingly...

Probably a dup of the general problem we have with tables not taking margins of
kids into account when sizing.
Summary: Text does not display in a nested table with CSS → Margin-left on a nested table makes it overflow the parent table
I would call that more blocks not telling the truth but I may be biased.
Either way.  Note that in this case there are no blocks inside the outer table....

In general, I don't believe margins affect MEW/MES in gecko, do they?  And apart
from that, it's the parent's responsibility to take the margins into account
when sizing self and positioning kids...

That said, note that floats have the same issue as tables, as do absolutely
positioned elements.  So we need to solve the "margin problem" for
shrink-wrapping things in general.
Attached file Yet another testcase
This shows that it only overflows when a percentage margin-left is set on a
table.
Whiteboard: [reflow-refactor]
Hardware: PC → All
Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.9a1) Gecko/20061208 Minefield/3.0a1 ID:2006120812 [cairo]

seems fixed by reflow branch landing
Status: NEW → RESOLVED
Closed: 14 years ago
Depends on: reflow-refactor
Resolution: --- → FIXED
Need to check in a regression test
Flags: in-testsuite?
You need to log in before you can comment on or make changes to this bug.