Hi Kara,

Unlike a <td>, a div will expand to fill the available space (and not the 
content it contains), if a width is not specified.

To achieve the layout you describe, you will need to:
-set widths on the divs, and/or
-set left or right margins to accommodate both divs, for example if <div> [A] 
is 20px width then <div> [B] should have a left margin of 21px.

This tutorial might help:
< 
http://www.456bereastreet.com/lab/developing_with_web_standards/csslayout/2-col/
 >
, otherwise try googling: 'CSS 2 col layout'.

>For some reason, both divs are expanding horizontally to take up all the
>available space, even when the content inside them is only 20 pixels
>wide. I'm not specifying any widths because the content is dynamic so I
>have no way of knowing what the width will be.
>
>The only width I have specified is the container width of 60em.
>
>Why are they doing this? Shouldn't they only expand horizontally to make
>room for whatever is contained in them - in this case only a few words?

Cheers,

-- 
Andy Kirkwood | Creative Director

Motive | web.design.integrity
http://www.motive.co.nz
ph: (04) 3 800 800  fx: (04) 970 9693
mob: 021 369 693
93 Rintoul St, Newtown
PO Box 7150, Wellington South, New Zealand
******************************************************
The discussion list for  http://webstandardsgroup.org/

 See http://webstandardsgroup.org/mail/guidelines.cfm
 for some hints on posting to the list & getting help
******************************************************

Reply via email to