SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Zealot
    Join Date
    Aug 2008
    Location
    Western Australia
    Posts
    128
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Nested navigation - active and subactive

    In the example below of a nested nav list, is it necessary to put in <li class="subactive" and "class="subcurrent">? I took it out of the first section just leaving the "active" and "current" on the last item and it still works. There is no styling for .subactive or .subcurrent in the CSS, only for .current.


    <div class="nav">
    <ul class="navlist">
    <li><a href="index.html">Home</a>
    <ul class="subnavlist">
    <li><a href="operation.html">Operation</a></li>
    <li><a href="projects.html">Projects</a></li>
    <li class="active"><a href="members.html" class="current">COMMITTEE and MEMBERS</a></li>
    </ul>
    </li>

    <li><a href="#">WEED SPECIES</a>
    <ul class="subnavlist">
    <li class="subactive"><a href="watsonia.html"class="subcurrent">Watsonia</a></li>
    <li><a href="oxalis.html">Oxalis</a></li>
    <li><a href="carnation.html">Carnation Weed</a></li> <li><a href="taro.html">Taro</a></li>
    </ul>
    </li>........and so on to </ul></div>

    Thanks

  2. #2
    Design Your Site Team bronze trophy Erik J's Avatar
    Join Date
    May 2007
    Location
    Countryside, Sweden
    Posts
    3,407
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    If there will be no styling using the classes, absolutly you should remove them, but ofcourse you decide if they will come to use in the future and if they do no harm in the meantime.
    Happy ADD/ADHD with Asperger's

  3. #3
    SitePoint Zealot
    Join Date
    Aug 2008
    Location
    Western Australia
    Posts
    128
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks erik.j - that's what I wanted to confirm.

  4. #4
    In memoriam gold trophysilver trophybronze trophy Dan Schulz's Avatar
    Join Date
    May 2006
    Location
    Aurora, Illinois
    Posts
    15,476
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    In 95&#37; of cases there'll also be no need for the DIV around the list menu, so you can safely remove that as well and just apply its styles to the list itself.

  5. #5
    SitePoint Zealot
    Join Date
    Aug 2008
    Location
    Western Australia
    Posts
    128
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks Dan !


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
  •