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

Re: width of absolutely positioned, non-replaced elements

From: Matthew Brealey <thelawnet@yahoo.com>
Date: Sat, 4 Mar 2000 08:43:52 -0800 (PST)
Message-ID: <20000304164352.22816.qmail@web904.mail.yahoo.com>
To: www-style@w3.org
--- Joe Hewitt <joe@joehewitt.com> wrote:
> This section states that when the width (or height, as in 10.6.4) of
> said
> element is "auto", the width will extend to the boundaries of it's
> containing block.  The consequence of this is that said absolutely
> positioned elements have no means of accurately representing the
> dimensions
> of their content. 

Under the rules I proposed for inline blocks, this could be achieved by
display: inline-block:

<blockquote
cite="http://lists.w3.org/Archives/Public/www-style/2000Feb/0215.html">
...
Width of non-replaced inline block elements
---------------------
A specified value of 'auto' for 'left', 'right', 'margin-left' or
'margin-right' becomes a computed value of '0'. A specified value of
'auto' for 'width' gives the width of the content as the width of the
element. For the purposes of min-width, this is treated as a width of 0,
so if min-width is set to a value other than 0, this will override it.

Inline blocks
------------
If a non-replaced inline block has width: auto (and min-width: auto), the
element will be formatted as a single line. If it has an explicit width,
the element will behave like an ordinary block element in that content
will wrap at the edge of the element.
</blockquote>

Just one minor change to this is needed - to 'for the purposes of' I would
append: '; of course for the purposes of referring to the value for
'width' (e.g., for scripting, margin %) the auto-sized width is treated in
the same way as an explicitly set one'. 

> I have been told by folks like Ian Hickson and Troy Chevalier that this
> issue is being discussed and likely to be revised in a future errata
> item.

To call it an erratum would be to strain the natural sense of the word.
This can scarce be called one - no-one is suggesting that it is an
unintended mistake, only that it doesn't allow every possible effect to be achieved.

=====
----------------------------------------------------------
From Matthew Brealey (http://members.tripod.co.uk/lawnet (for law)or http://members.tripod.co.uk/lawnet/WEBFRAME.HTM (for CSS))
__________________________________________________
Do You Yahoo!?
Talk to your friends online with Yahoo! Messenger.
http://im.yahoo.com
Received on Saturday, 4 March 2000 11:43:53 GMT

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