SitePoint Sponsor

User Tag List

Results 1 to 4 of 4

Thread: CSS ul li

Hybrid View

  1. #1
    SitePoint Enthusiast
    Join Date
    Oct 2002
    Posts
    91
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    CSS ul li

    I am trying to redo a side menu (http://dantclayton.com/products_dir.htm) and want to use CSS <ul> but am having problems getting the third tier to position correctly. What is the correct syntax for controlling that third tier<li>.

    Right now I am using
    <ul>
    <li>Title
    <ul>
    <li>menu item 1 </li>
    <li>menu item 2
    <ul>
    <li>sub item 1</li>
    </ul>
    </li>
    </ul>
    </li>
    </ul>

    Thank in advance
    NOEINK
    <Think Without Ink>

  2. #2
    doing my best to help c2uk's Avatar
    Join Date
    May 2005
    Location
    Cardiff
    Posts
    1,832
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    e.g.
    Code:
    ul li ul li ul li {
    margin: 0 .75em;
    }
    But using classes would definitely help.
    Dan G
    Marketing Strategist & Consultant

  3. #3
    SitePoint Enthusiast
    Join Date
    Oct 2002
    Posts
    91
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    do you mean assigning a class to each set of <li>?
    NOEINK
    <Think Without Ink>

  4. #4
    doing my best to help c2uk's Avatar
    Join Date
    May 2005
    Location
    Cardiff
    Posts
    1,832
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    More like:

    HTML Code:
    <ul class="toplevel">
        <li>Title
            <ul class="firstlevel">
                 <li>menu item 1 </li>
                 <li>menu item 2
                      <ul class="secondlevel">
                          <li>sub item 1</li>
                      </ul>
                 </li>
             </ul>
        </li>
    </ul>
    Dan G
    Marketing Strategist & Consultant


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
  •