Closed
Bug 319580
Opened 20 years ago
Closed 16 years ago
nesting of multiple elements which use different positioning schemes become invisible when a certain parent element has no visible border
Categories
(Core :: Web Painting, defect)
Tracking
()
RESOLVED
FIXED
People
(Reporter: mozilla, Assigned: roc)
Details
(Keywords: regression, testcase)
Attachments
(3 files)
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8) Gecko/20051111 Firefox/1.5
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8) Gecko/20051111 Firefox/1.5
sounds strange? it is :(
this example will show you what i mean:
<table border=1 cellpadding=0 cellspacing=0 width="100%">
<tr>
<td>
<div style="background:silver; width:100%; height:300px; position:relative">
<div style="background:gray; width:100%; height:300px; position:relative">
<div style="background:green; width:50%; height:200px; position:absolute">111</div>
<div style="background:blue; width:50%; height:100px; position:absolute; left:50%">222</div>
</div>
</div>
</td>
<td width=150>333
</td>
</tr>
</table>
looks fine so far. but now change the border attribute value to "0".
took me a while to find the reason why some content on my pages got missing since i upgraded to FF 1.5.
FF 1.0.x doesn't have that problem.
this is a simplified sample. same things happens when css borders are used. and i'm not sure if it has something to with the table.
Reproducible: Always
Steps to Reproduce:
1.create a html file with my sample table and open in FF 1.5 (renders correctly)
2.change the border to "0"
3.reload and wonder what happened
Actual Results:
content disappears when border is set to 0
Expected Results:
of course the border should _not_ affect rendering.
| Reporter | ||
Comment 1•20 years ago
|
||
| Reporter | ||
Comment 2•20 years ago
|
||
Comment 3•20 years ago
|
||
Okay, this can be simplified. For some reason, the 100% width in the outer div is being calculated as zero, so all the other inside divs are being calculated as having width zero, too.
If we put absolute values everywhere except for the outer div's width, we get:
<table border="0" cellpadding="0" cellspacing="0" style='width: 800px;'>
<tr>
<td>
<div style="background:silver; color: black; width:100%; height:300px;">
<div style="background:green; color: black; width: 325px;height:200px; po
sition:absolute;">111</div>
</div>
</td>
<td style="width: 150px;">333</td>
</tr>
</table>
But this renders as if the outer div and its containing <td> cell is width zero, which is very strange.
Keywords: regression,
testcase
| Reporter | ||
Comment 4•20 years ago
|
||
so far i found out that this bug happens when _all_ of the following "requirements" are met:
-> a table cell only has content thats using position:relative
-> the table has more than 1 cell
-> the cell has no width set
-> the cell has 0 padding
-> the table is rendered table-layout:auto (default)
-> the relative positioned content has 0 padding and margin
Updated•16 years ago
|
QA Contact: ian → layout.view-rendering
| Reporter | ||
Comment 5•16 years ago
|
||
works fine in current 3.6
so closing this old bug.
Status: UNCONFIRMED → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
Updated•7 years ago
|
Component: Layout: View Rendering → Layout: Web Painting
You need to log in
before you can comment on or make changes to this bug.
Description
•