[thelist] CSS - specific SPAN width problem

Stefan Schwarzer st.schwarzer at geois.de
Wed Apr 26 02:03:16 CDT 2006


Hi,

I am struggling with a perhaps rather strange objective:

I have a horizontal navigation bar with five items.
Directly below I would like to have another DIV element with, again,  
five "items" - that is a background-image. But: Only if one of the  
navigation items will be selected, something will appear in the "box"  
below that navigation item.

Now, the problem is that it seems that I can't define the width of  
the elements. The result is that the fist navigation items are spread  
out along the length of their name. But the second DIV elements  
spread out only one character, that is the  .

So, I have my

<div style="width: 100%">
	<span .... >item 1</span>
	<span .... >item 2</span>
	<span .... >item 3</span>
	<span .... >item 4</span>
	<span .... >item 5</span>
</div>
<div style="width: 100%">
	<span .... >&nbsp;</span>
	<span .... >&nbsp;</span>
	<span .... >&nbsp;</span>
	<span .... >&nbsp;</span>
	<span .... >&nbsp;</span>
</div>

I tried to add "style='width: 20%'" to the SPAN elements, but this  
doesn't work.

Can anyone help me out?

Thanks a lot!

Stef



More information about the thelist mailing list