You're a legend - thanks :) 

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Tatham Oddie (Fuel
Advance)
Sent: Tuesday, 4 October 2005 1:00 PM
To: wsg@webstandardsgroup.org
Subject: RE: [WSG] Width defaulting to 100%?

Kara,

Block elements (like <div>) always expand to the full width by default.

By the sounds of it you're after an inline element, so either:

A) use a <span> instead

or

B) set display:inline; on the DIV

You might find it helpful to read up on the difference between block and
inline elements.



Thanks,

Tatham Oddie
Fuel Advance - Ignite Your Idea
www.fueladvance.com


-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]
On Behalf Of Kara O'Halloran - Eduka
Sent: Tuesday, 4 October 2005 2:39 PM
To: wsg@webstandardsgroup.org
Subject: [WSG] Width defaulting to 100%?

Hi guys,

I have 2 divs inside a container.

1: a relatively positioned div to contain and position an image
2: another div, absolute position, to contain a submenu. 

Image on left, menu on right.

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?

Any help would be appreciated. :)
K

(ps this happens in both ff and ie.)
******************************************************
The discussion list for  http://webstandardsgroup.org/

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



******************************************************
The discussion list for  http://webstandardsgroup.org/

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

******************************************************
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