- From: George Chavchanidze <gch@rmi.acnet.ge>
- Date: Fri, 27 Feb 2004 12:52:51 -0400 (GMT)
- To: www-style@w3.org
CSS2.1 visual formatting model says that width of absolutely positioned elements should be determined from the following constraint: '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. Now imagine that all offsets, margins, padding and borders of absolutely positioned element vanish (just for simplicity). Then since offsets are calculated from padding edge of the containing block it is clear that width of the positioned element should be equal to width plus sum of left and right padding of its containing block. From the other hand constraint mentioned above gives rise to apparently inconsistent result: 'width' = width of containing block Is it error in specs or under width of containing block you mean width of padding box (not content box)? If so I think it is better to indicate this in specs because in other parts of spec this term refers to width of content box. 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. Best wishes, George
Received on Friday, 27 February 2004 03:46:02 UTC