Closed
Bug 253094
Opened 21 years ago
Closed 20 years ago
div absolute position is off when located in fixed width table
Categories
(Core :: Layout: Tables, defect)
Tracking
()
RESOLVED
FIXED
People
(Reporter: derek, Unassigned)
References
()
Details
(Keywords: testcase)
Attachments
(1 file)
638 bytes,
text/html
|
Details |
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7) Gecko/20040707 Firefox/0.9.2
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7) Gecko/20040707 Firefox/0.9.2
The browser is acting like it should, so I don't know if this is really a bug.
But regardless, the browser is producing something that the user did not intend.
When you create a table with a set width, and the columns have set widths. As
it renders the table, the table columns will grow or shrink depending on the
contents of the cells. If you put a <div> in one of these columns with a
position of absolute and only that (NO Top & left position), it will set it's
position as soon as the table renders, but while it's rendering the cells
positions will change. The div won't change with it. So this div will be off
position, but when you resize the browser, it sets the div to the proper position.
Reproducible: Always
Steps to Reproduce:
1.Create a table with with a set width <table width="XXX">
2.In second column enter a div with a position of absolute
3.The page must be refreshed so that it renders the table as it loads the page.
(hold shift and press refresh button on toolbar)
Actual Results:
The div with the position of absolute will be out of place with the rest of the
content in the cell. When you resize the page though, it will be put into the
proper position.
Expected Results:
It should render the div and then wait until the table was loaded and then
reposition the div again.
I don't know if this is really a bug. If a div has a position of absolute,
doesn't that mean that it can be anywhere on the page? But the idea is that if
you put a div on a page, with a position of absolute, the div should start where
it is on the page.
The thing that is weird about this is that when you resize the browser it moves
the div back into the position that it should be in.
The work around that I used for this is just to get rid of the fixed width of
the table. I just used the cell widths instead. That way, as it renders, it
doesn't resize the cells.
Also please don't yell at me if I did something wrong, this is the first time
I've submitted a bug. I searched for it before, but I couldn't find nothing.
![]() |
||
Comment 1•21 years ago
|
||
Derek, thank you for the excellent bug report! I'm fairly sure that the
behavior you are seeing is caused by bug 175364, so marking dependent.
If you could attach your testcase to this bug using
http://bugzilla.mozilla.org/attachment.cgi?bugid=253094&action=enter so that it
won't go away, that would be much appreciated.
Depends on: 175364
Reporter | ||
Comment 2•21 years ago
|
||
Testcase for Bug 253094
Updated•21 years ago
|
![]() |
||
Comment 3•20 years ago
|
||
Fixed by checkin for bug 261064, looks like.
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.
Description
•