Click to See Complete Forum and Search --> : horizintal lists instead of vertical


R.Noon
03-08-2006, 10:43 AM
Alright.
If I have code like below, how can I get the list items to stack horizintaly instead of verticaly?


<ul>
<li></li>
<li></li>
</ul>

scojo1
03-08-2006, 10:50 AM
you can add some css like


ul li{
float: left;
}


or


ul li{
display: inline;
}



I think either option works

R.Noon
03-08-2006, 11:04 AM
I tried


* ul li{
display:inline;
}


Didn't work at all, it just raised the list items above the original list.

scojo1
03-08-2006, 11:13 AM
I tried


* ul li{
display:inline;
}


Didn't work at all, it just raised the list items above the original list.


here is the exact test file, works in IE and FF, so if you're having other problems I don't know what would be causing them.... is there more code you could post?


<style type="text/css">
* ul li{
display: inline;
}


</style>

<ul>
<li>item 1</li>
<li>item 2</li>
</ul>

ray326
03-08-2006, 12:09 PM
http://www.alistapart.com/articles/taminglists/