[thelist] Re: Side-by-side Divs
Stephen Caudill
SCaudill at municode.com
Wed Jun 18 14:34:40 CDT 2003
djinn at darkdesigns.org bespaketh on Wednesday, June 18, 2003 3:21 PM:
>>>> From what I've read, it seems like I need to use Float: left
>> for this to
>> happen, but I believe that using Float requires that you specify a
>> width for the div. Is this true? I'd rather not do that.
>
>> Jean,
>> by default a div has 100% width. If you don't specify a
> width, the div
> takes up the entire width of the screen. Why wouldn't you want to
> specify a width? I'm confused.
>
>> -stephen caudill
>
> Boy, I'd be confused too ;) I didn't realize that a div was always
> 100% (don't use them alot - can you tell?). I thought it would be as
> large as it's contents. Is there a way of specifying that a div be as
> large as it's contents that is well supported?
>
> Jean Peterson
no. And in the case of its contents being text, it will default to 100% of its parent's width. If you let us know what you are trying to do and what the div contains, then we can probably help.
another thought: the span element might be more what you are looking for... again it will depend on its contents.
-stephen caudill
http://www.mechavox.com
More information about the thelist
mailing list