W3C home > Mailing lists > Public > www-style@w3.org > February 2004

Re: Question on CSS2.1 absolute positioning

From: Boris Zbarsky <bzbarsky@MIT.EDU>
Date: Fri, 27 Feb 2004 03:52:24 -0500
Message-Id: <200402270852.i1R8qO90018635@nerd-xing.mit.edu>
To: George Chavchanidze <gch@rmi.acnet.ge>
Cc: www-style@w3.org

> 'left' + 'margin-left' + 'border-left-width' + 'padding-left' + 'width' +
> 'padding-right' + 'border-right-width' + 'margin-right' + 'right' = width
> of containing block
> In the same time CSS2.1 clearly says that 'left' and 'right' offsets are
> calculated from
> padding edge of containing block (and not content edge), while under width
> of
> containing block one usually means content width.

"Usually".  Not for absolutely positioned elements.  Or fixed position
elements.  Please see
(which should probably be linked to from uses of the term "containing block",
to prevent issues like this from arising....)

> Here is test page that demonstates the problem:
> http://geocities.com/csssite/operabugs/bug3.xml
> view it in Opera and you will see how browser miscalculates right offset,
> due to inconsistency in spec.

There isn't any inconsistency, this once.  ;)

Modern art is what happens when painters stop looking at girls and 
persuade themselves that they have a better idea.
                                          -- John Ciardi
Received on Friday, 27 February 2004 03:52:53 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 27 April 2009 13:54:26 GMT