W3C home > Mailing lists > Public > www-style@w3.org > March 2000

Re: Very bad errors in positioning

From: Matthew Brealey <webmaster@richinstyle.com>
Date: Mon, 20 Mar 2000 15:22:11 -0800
Message-ID: <38D6B29A.212E@richinstyle.com>
To: www-style@w3.org
L. David Baron wrote:
[references to errata snipped - sorry, I thought I'd read them, but
obviously not thoroughly enough]

> > It is stated here that if 'height' and 'bottom' are both auto, bottom is
> > replaced with 0. This is very badly wrong. For example, take <DIV
> > style="position: absolute; top: 100px">Some text</DIV>. In this case,
> > since 'height' and 'bottom' are both auto, bottom is replaced by 0. This
> > leaves the only auto value as 'height', so the conclusion is that the
> > height is the height of the containing block - 100px. For a typical
> > document that is 10,000 pixels high, this gives a height of 9,900 pixels
> > for an element whose height really should only be the height of its
> > content (i.e., one line box, assuming that 'Some text' can be formatted
> > as a single line).
> 
> This is the way the current spec was designed.  

I don't think the current position can be defended in view of the fact
that it results in excessively large backgrounds and % heights or
top/bottom that are too big.

> > In addition, the statement that 'auto' be replaced 'with the distance
> > from the top edge of the containing block to the top margin edge of a
> > hypothetical box that would have been the first box of the element if
> > its 'position' property had been 'static'. (But rather than actually
> > computing that box, user agents are free to make a guess at its probable
> > position.) The value is negative if the hypothetical box is above the
> > containing block.' is also wrong. In particular, the issue of the first
> > box of the element does not seem correct - surely it should be the top
> > margin edge of the element itself.
> 
> Why is it wrong?  It's the intended behavior (although it makes the
> spec very complicated because it's accomplished with 'auto').

Sorry, it's me, getting confused with my margin edges again (the margin
edge is really the bottom border edge of the previous element - an
element cannot affect its margin edge).

----------------------------------------
Please visit http://www.richinstyle.com
Featuring:  CSS bug guides (more than 1000 CSS bugs) CSS Masterclass
HTML 4 guide    CSS 1 guide    CSS 2 guide   Web-safe colorizer 
CSS bug table     More than 300 CSS test pages
Received on Monday, 20 March 2000 10:19:12 GMT

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