Previous Message
Next Message

Re: [css-d] what am I missing here?

Sent by Mark Howells on 30 January 2002 09:09


> <div style="color:black; background-color:yellow; margin-top: 1.5em;">
> 	<span style="border: solid black .1em; width:20%">one</span>
> 	<span style="border: solid black .1em; width:20%">two</span>
> 	<span style="border: solid black .1em; width:20%">three</span>
> 	<span style="border: solid black .1em; width:20%">four</span>
> </div>
>
> Can someone explain to me why this isn't valid for spacing 4 items
> equally on one line?

I believe that it's because <span> isn't a block element, but an inline 
element. Width is an attribute of block elements.

Regards
Mark Howells
<http://www.mark.ac/css/>
Previous Message
Next Message

Message thread: