Closed
Bug 46983
Opened 24 years ago
Closed 22 years ago
[REL POS] Relatively positioning an inline box inside a table cell wrongly affects cell dimensions
Categories
(Core :: Layout: Tables, defect, P3)
Core
Layout: Tables
Tracking
()
RESOLVED
FIXED
Future
People
(Reporter: make, Assigned: dbaron)
References
Details
(Keywords: css2, testcase, Whiteboard: [awd:tbl][patch])
Attachments
(2 files, 2 obsolete files)
From Bugzilla Helper: User-Agent: Mozilla/4.74 [en] (WinNT; U) BuildID: 2000072909 Images inside table cells which are (relative) positioned via a CSS style may lead to an increased row height of the table. Reproducible: Always Steps to Reproduce: 1. Create a page with an IMG inside a TD. Add some text to another TD 2. Move the IMG down by adding a CSS style like {position:relative; top:100px;} Actual Results: 3. The table will behave as if the following CSS style has been used for the TD {padding-top:100px;}, ie. the row height will be increased as much is needed to keep the img inside the cells boundary. Expected Results: My understanding of relative positioning is something like this: Do initial layout -> Move relative positioned elements (w.o. changing the layout). I would expect that the tables row height should not change if I move the IMG via CSS (BTW. what may happen if the IMG is moved up?). Maybe I add a testcase tomorrow. No time left today.
Reporter | ||
Updated•24 years ago
|
Keywords: css1,
makingtest
Reporter | ||
Updated•24 years ago
|
Reporter | ||
Comment 1•24 years ago
|
||
Updated•24 years ago
|
QA Contact: chrisd → py8ieh=bugzilla
Comment 2•24 years ago
|
||
Something has to go - denying beta3 nomination for absolute/relative positioning problems in tables.
Status: NEW → ASSIGNED
Whiteboard: [nsbeta3-]
Target Milestone: --- → Future
Updated•24 years ago
|
Summary: Relative positioning of an IMG inside a TD influences table row height → [POS] Relative positioning of an IMG inside a TD influences table row height
Updated•24 years ago
|
Summary: [POS] Relative positioning of an IMG inside a TD influences table row height → [REL POS] Relative positioning of an IMG inside a TD influences table row height
Comment 3•24 years ago
|
||
I'm no expert in CSS, but I think that tables are structural entities which are meant to hold content inside them. Bringing content that was inserted inside a <td> within a table and making it move outside a table is kind of meaningless. Why should it be in a table structure in the first place if it is not meant to physically be there. Personally, I think IE 5.5 renders this wrong by allowing the relative position outside the table. I think Mozilla does it correctly by just extending the height of the table to keep it within there. Maybe I'm on the above, but I think it is a misuse of table any way you look at it. Should things even be allowed to be relatively positioned within the table? Enlighten me. jake
Comment 4•24 years ago
|
||
According to CSS, yes, relatively positioning _anything_ is allowed. Don't forget, CSS is not about structure, it's about presentation. The underlying document should be purely structural, and the CSS should be presentational. So what happens if you want to relatively position something that happens to be in a table? Hence it is allowed.
Assignee | ||
Comment 5•24 years ago
|
||
Whatever you may think about CSS and tables, relative positioning should never affect ancestor elements.
Comment 7•24 years ago
|
||
Ok, I'm convinced. Mostly going on a gut feeling and the fact that this bug hadn't been commented on since early august and seemed like it needed a kick in the butt to get it fixed. Like I said "I'm no expert in CSS". I'll read a bit more of the spec before I make a statement like that again. Sorry. I am glad the bug is getting attention again, though. Jake
Updated•23 years ago
|
QA Contact: ian → amar
Updated•23 years ago
|
using FizzillaCFM/2002071208, the testcase works as expect IF the images are changed to display: block using CSS. (See bug 22274). As such, I suggest this bug be resolved WFM.
Comment 10•22 years ago
|
||
Comment 11•22 years ago
|
||
Setting All/All since first testcase behavior can be observed as originally described using FizzillaCFM/2002071208.
OS: Windows NT → All
Hardware: PC → All
Assignee | ||
Comment 12•22 years ago
|
||
No, this is a bug and should not be resolved as worksforme.
Attachment #91236 -
Attachment description: Updated testcase with img { display: block; } CSS rule → Modified testcase with 'img { display: block; }' CSS rule
Comment 13•22 years ago
|
||
Ah, I think I get the point. The problem is that relatively positioning any inline box inside a TD influences the table cell height. Using display: block is merely a workaround. I think this might be a better Summary.
Summary: [REL POS] Relative positioning of an IMG inside a TD influences table row height → Relatively positioning an inline box inside a table cell wrongly affects cell height
Comment 14•22 years ago
|
||
Attachment #12146 -
Attachment is obsolete: true
Attachment #91236 -
Attachment is obsolete: true
Assignee | ||
Updated•22 years ago
|
Summary: Relatively positioning an inline box inside a table cell wrongly affects cell height → [REL POS] Relatively positioning an inline box inside a table cell wrongly affects cell height
Summary: [REL POS] Relatively positioning an inline box inside a table cell wrongly affects cell height → [REL POS] Relatively positioning an inline box inside a table cell wrongly affects cell dimensions
Assignee | ||
Comment 15•22 years ago
|
||
See bug 172896 comment 11, which describes a fix for this bug.
Assignee | ||
Comment 16•22 years ago
|
||
This is fixed by my patch on bug 172896.
Assignee: karnaze → dbaron
Status: ASSIGNED → NEW
Depends on: 172896
Whiteboard: [awd:tbl] → [awd:tbl][patch]
Comment 17•22 years ago
|
||
The code gives a table with columns that shrink and grow as they are changed. Surely they should stay the same? The problem seems similar to bug 46983.
Comment 18•22 years ago
|
||
Steps to reproduce the problem in the above attachment. 1. Load the attachment. 2. Click near the top of the text and then near the bottom so there are two red columns. 3. Repeatedly click either column and see it grow or shrink. Tested in K-Meleon Version 0.7 Build 700 Compiled Thu Oct 31 00:54:24 2002
Assignee | ||
Comment 19•22 years ago
|
||
The previous two comments are not related to this bug.
Assignee | ||
Comment 20•22 years ago
|
||
Fixed by checkin of bug 172896.
Status: NEW → RESOLVED
Closed: 22 years ago
Resolution: --- → FIXED
Comment 21•22 years ago
|
||
just wanted to note that the attachment in comment 17 crashes Phoenix (latest nightly). However, there are lots of crashers today and I'm not sure which of these might match with this crasher. I'll let someone else figure that out...or I might check back and do it myself if I get the time. Jake
You need to log in
before you can comment on or make changes to this bug.
Description
•