Bug 75982 - Div with absolute position in table cell still takes up layout space
Summary: Div with absolute position in table cell still takes up layout space
Status: RESOLVED WORKSFORME
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: 525.x (Safari 3.2)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-01-10 12:38 PST by jgweissman
Modified: 2023-10-02 22:42 PDT (History)
1 user (show)

See Also:


Attachments
Test/Demo (848 bytes, text/html)
2012-01-10 12:39 PST, jgweissman
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description jgweissman 2012-01-10 12:38:24 PST
A script sets a div to have absolute position. If the div is in a table cell, the layout is not recomputed and the position of other elements continues to reflect the size of the div. The position of the other elements should ignore the div.

See attached test. A single row table with two cells contains relatively positioned divs. The div in the first cell is invisible but takes up space, and the div in the second cell has a red background, to easily show its position. Initially the visible red div should appear displaced from the top left corner. A script sets a two second timer to set the invisible div to have absolute position. This should make the div no longer take up space, so the visible red div should move left into the corner. This works correctly in Firefox, but the red div fails to move in both Chrome and Safari.
Comment 1 jgweissman 2012-01-10 12:39:33 PST
Created attachment 121891 [details]
Test/Demo
Comment 2 Karl Dubost 2023-10-02 22:42:10 PDT
For this bug, the behavior is the same in the Blink, Gecko and WebKit.