[thelist] CSS Positioning help - box outline probs in NS & Opera

Karen J. Bowen karen at miinx.com.au
Sat Apr 6 22:38:01 CST 2002

Kevin wrote:
>>>2) The pink box with code in the centre.  How do I make that wrap to the size
>>>of the text inside it?
> It's currently stretching to the size of the containing DIV.
> I'd like it to only be as wide as the larget element inside it.

As the PRE is picking up the width property from the parent div, you
need to add another width property to your "#main pre" declaration to
force it to wrap to the size you specify.

I inserted "width:20%;" and found it would be kept as wide as its
content but would collapse as appropriate.

There's probably a much more elegant way to do this but I'm not sure
what it is...

Miinx Design & Development
e :: karen at miinx.com.au
p :: 03 9534 2659
w :: www.miinx.com.au

More information about the thelist mailing list