Closed Bug 321363 Opened 19 years ago Closed 19 years ago

Absolute positioned div does not appear inside parent table element

Categories

(Core :: Layout, defect)

x86
Linux
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 63895

People

(Reporter: andrew, Unassigned)

References

()

Details

User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8b2) Gecko/20050702 Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8b2) Gecko/20050702 If a DIV element is created with CSS style=position:absolute, and nested inside a TABLE element, its position is referenced wrt. the page origin instead of the origin of the TABLE element. In contrast, if the DIV element is placed inside another DIV element with style=position:relative, it is positioned inside the nesting element Reproducible: Always Steps to Reproduce: <style> td.gbox {position:relative;} div.rbox {position:absolute;} </style> <table class="gbox"> <td class="gbox"> <div class="rbox" style="left:0px;">0px</div> </td> </table> Actual Results: 0px [ ] Expected Results: [ 0px ] I expect that absolutely-positioned elements declared within the page body will be placed at an absolute position on the page, but that if placed within other elements will be positioned with respect to the origin of that element, as I read the CSS spec.Mozilla appears to position DIV within other DIV correctly, but if the parent element is a TABLE, P, or SPAN it does not. IE places it how I would expect, although there are some vagaries of padding etc that may be either wrong or a different interpretation of the spec. An absolute DIV nested inside a relative DIV nested inside a TABLE cell works OK and gives me the effect I need. - to be able to create an object consisting of multiple layers of graphics and text all positioned wrt. a common origin, placed inline on a page with nomal flow-rendered text above it.
Assignee: general → nobody
Component: General → Layout
Product: Mozilla Application Suite → Core
QA Contact: general → layout
Version: unspecified → Trunk
*** This bug has been marked as a duplicate of 63895 ***
Status: UNCONFIRMED → RESOLVED
Closed: 19 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.