SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Zealot jb007irl's Avatar
    Join Date
    Jun 2003
    Location
    Ireland
    Posts
    129
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Display li and ul tags horizontally

    Hi,

    I'm trying to display the following html menu structure horizontally across the page but I'm not sure how to write the CSS so it will display horizontally:

    Code:
    <div id="globalNav"> 
    <ul id="nav"> 
    <li><a href="index.php">home</a></li> 
    <li><a href="linkone.php">link one</a></li>
    <li><a href="linktwo.php">link two</a></li> 
    <li><a href="#">+ link three</a> 
    <ul> 
    <li><a href="sublinkoneofthree.php">sub link one of three</a></li> 
    <li><a href="sublinkoneofthree.php">sub link two of three</a></li> 
    <li><a href="sublinkoneofthree.php">sub link three of three</a></li> 
    </ul> 
    </li>
    <li><a href="linkfour.php">link four</a></li>	
    <li><a href="#">+ link five</a>
    <ul> 
    <li><a href="sublinkoneoffive.php">sub link one of five</a></li> 
    <li><a href="sublinktwooffive.php">sub link two of five</a></li>
    </ul> 
    </li>
    <li><a href="linksix.php">link six</a></li>				  
    </ul>
    </div>
    Can somebody point me in the right direction please?

    thanks for you help in advance.
    Is minic a bhris béal duine a shrón.

  2. #2
    The CSS Clinic is open silver trophybronze trophy
    Paul O'B's Avatar
    Join Date
    Jan 2003
    Location
    Hampshire UK
    Posts
    40,374
    Mentioned
    180 Post(s)
    Tagged
    6 Thread(s)
    Hi,

    You will probably need to either float the list or make it display-inline to get it to display horizontally.

    It might be better if you have a look here at some horizontal lists and find something that suits your design.

    http://css.maxdesign.com.au/listamatic/

    There is even a list generator here if you really get stuck.

    http://www.accessify.com/tools-and-w...st-o-matic.asp

    I could do it for you but then you would learn nothing So its best you have a stab at it first and then post when you get stuck

    Paul


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •