SitePoint Sponsor

User Tag List

Page 2 of 2 FirstFirst 12
Results 26 to 32 of 32
  1. #26
    The CSS Clinic is open silver trophybronze trophy
    Paul O'B's Avatar
    Join Date
    Jan 2003
    Location
    Hampshire UK
    Posts
    40,281
    Mentioned
    179 Post(s)
    Tagged
    6 Thread(s)
    This works:
    #btmnav .navbox li li a:visited, #btmnav .navbox li li a:active {color:#f00251!important}
    That should do what you want.

    Don't remove anything that says li:hover or li.over as that makes the submneu appear (although you can change colours etc. in those rules).

    The li.over is the dynamic class that the script adds to list element on hover so that you can imitate the CSS hover effect of li:hover. That's why all li:hover rules are duplicated for IE6 using li.over {}

  2. #27
    SitePoint Evangelist
    Join Date
    Jul 2008
    Location
    Port Elizabeth, South Africa
    Posts
    404
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi - I know Paul's busy! Does anyone know the best way to stop the first-level links under "Fun to Read" viz

    How to Eat Raw | Sprout | Blend | Juice | Dehydrate | Recipes | Water

    from changing color when it's visited? So it stays blue all the time in just that one single line?

    The problem is there's a lot of dropdowns under each one that have *not* been visited, so I'd rather keep that first level blue and unvisited.

    http://www.greensmoothie.com/test/blend/1mst.php

    thank you - Val

  3. #28
    The CSS Clinic is open silver trophybronze trophy
    Paul O'B's Avatar
    Join Date
    Jan 2003
    Location
    Hampshire UK
    Posts
    40,281
    Mentioned
    179 Post(s)
    Tagged
    6 Thread(s)
    HI Val.

    You should be able to style the top level visitedlinks using this:

    Code:
    #btmnav .navbox ul li a:visited{color:blue}
    Then the subnav links would be addressed like:

    Code:
    #btmnav .navbox ul li li a:visited{color:red}
    But you seem to have something in place for the subnavs anyway from the previous post.

  4. #29
    SitePoint Evangelist
    Join Date
    Jul 2008
    Location
    Port Elizabeth, South Africa
    Posts
    404
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi Paul -

    >style the top level visited links

    problem is that restyles *all* of them + I need just that one row restyled

    I tried this logic, based on your <ul class="row">. Created a class for ul li

    #btmnav .navbox ul li.funrow a:visited {color:blue}

    and then the html:

    <li class="funrow"><a href="...">How to Eat Raw</a>

    But it don't work - I can't understand why logic doesn't work in css, and then I come running for you

    Interesting that the .over is just for IE6 so can remove in future when stop supporting 6 (like you told me you no longer write for 5)

    thanks million, Val

  5. #30
    SitePoint Evangelist
    Join Date
    Jul 2008
    Location
    Port Elizabeth, South Africa
    Posts
    404
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    p.s. also tried

    #btmnav .navbox ul li.funrow a:visited {color:blue!important}

    but it doesn't hear me...

    I wonder if the problem is that the 1st level link is also repeated in one of the dropdown links? e.g.

    <li><a href="<../water/doctors.php">Water</a>
    <ul class="row">
    <li>
    <ul>
    <li><a href="<../water/doctors.php">Reviews of Medical Doctors</a></li>

    and after it's visited, I want it red (#f00251) in the second dropdown link ("Reviews of..") but blue in the 1st level link ("Water")

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

    I didn't realise you had used the same class (navbox) for all your other items but you already have a unique class on that drop down anyway so use that to style the links in that section only.

    e.g.
    Code:
    #btmnav .navdrop ul li a:visited {
        color:blue
    }

  7. #32
    SitePoint Evangelist
    Join Date
    Jul 2008
    Location
    Port Elizabeth, South Africa
    Posts
    404
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi Paul - oh that's simple, thank you! I saw that line:

    #btmnav .navdrop {position:relative; z-index:999}

    but I didn't know what it was

    Thanks million, everything's working perfectly now! - Val


Tags for this Thread

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
  •