[Webkit-unassigned] [Bug 15291] New: Absolute blocks inside relative blocks placed differently if block has no border.

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Sep 26 18:48:33 PDT 2007


http://bugs.webkit.org/show_bug.cgi?id=15291

           Summary: Absolute blocks inside relative blocks placed
                    differently if block has no border.
           Product: WebKit
           Version: 522+ (nightly)
          Platform: Macintosh
        OS/Version: Mac OS X 10.4
            Status: UNCONFIRMED
          Severity: Normal
          Priority: P2
         Component: CSS
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: rich at indieimage.com


In WebKit (and Gecko), relatively positioned blocks are not treated as normal
blocks unless they have a border. Without a border, they shrink to the size of
their normal flow content.

This causes problems with both absolutely positioned content inside the
relative block and with where to draw the block's background.

Absolutely positioned blocks inside relatively positioned blocks are currently
being placed relative to the enclosing block if the outer block has a border
and relative to the outer block's first child in normal flow if it has no
border.

Also, the outer block's background only covers an area the size of the block's
inline content if there is no border; if there is a border, it fills the entire
original block.

For example, in the following simplified code:

<div id="outer" style="position: relative">
        <div id="absolute" style="position: absolute; left: 0; top: 0;"></div>
        <div id="static" style="margin-top: 20px;"></div>
</div>

WebKit positions the absolute block at the top left of the static block's
content, which is 20 pixels lower than it should. This can cause the absolute
block to be rendered right on top of the static block's content, rather than
above it as intended.

Adding a border to the outer block causes the absolute block to move up 20
pixels to its intended position.

Gecko renders this identically to WebKit. IE, however, positions all blocks the
same regardless of whether they have borders or not.


-- 
Configure bugmail: http://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.



More information about the webkit-unassigned mailing list