views:

128

answers:

4

I need this because I want to make a menu (which is made from a HTML list) appear horizontally.

*I prefer not to use absolute positioning since it might become messy when I start changing the layout of the page.

Edition 01

I would like also to remove the indenting of the sub-lists, is it possible?

+6  A: 

quite simple:

ul.yourlist li { float:left; }

or

ul.yourlist li { display:inline; }
roman
+1  A: 

See http://css.maxdesign.com.au/listamatic/, this will give you useful hints.

naivists
+2  A: 

You will have to use something like below

#menu ul{
  list-style: none;
}

#menu li{
  display: inline;
}

and then

<div id="menu">
  <ul>
    <li>First menu item</li>
    <li>Second menu item</li>
    <li>Third menu item</li>
  </ul>
</div>
Ravia
please format code as code
Natrium
Will (display:inline;) remove the indenting for the sub-lists?
MAK
No. For that, you want `#menu li li{margin-left: 0; padding-left: 0;}`
Paul D. Waite
Great, Everything seems perfect. Thanks everyone!
MAK
+1  A: 

See http://www.cssplay.co.uk/menus/