This email is to be read subject to the disclaimer below.
Hi Sam,
> the (default) setting of width:auto should make the box only large enough
to contain it's elements, right?
This is not correct - when the width is set to auto the box will fill out
to until it is limited by margins or the parent container - and if the
margins are auto then they will shrink to 0
So the behaviour you are seeing is what it should be for a block level
element - on the other hand if you convert it to an inline element then it
will function as you expect - i.e. only fill out to the lenght of the text.
To make and element display inline use: "display: inline;"
Cheers,
Mark
--------------------
NOTICE - This communication contains information which is confidential and
the copyright of Ernst & Young or a third party.
If you are not the intended recipient of this communication please delete
and destroy all copies and telephone Ernst & Young on 1800 655 717
immediately. If you are the intended recipient of this communication you
should not copy, disclose or distribute this communication without the
authority of Ernst & Young.
Any views expressed in this Communication are those of the individual
sender, except where the sender specifically states them to be the views of
Ernst & Young.
Except as required at law, Ernst & Young does not represent, warrant and/or
guarantee that the integrity of this communication has been maintained nor
that the communication is free of errors, virus, interception or
interference.
Liability limited by the Accountants Scheme, approved under the
Professional Standards Act 1994 (NSW)
--------------------
*****************************************************
The discussion list for http://webstandardsgroup.org/
See http://webstandardsgroup.org/mail/guidelines.cfm
for some hints on posting to the list & getting help
*****************************************************