Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 7 of 7
  1. #1
    Senior Coder
    Join Date
    Dec 2004
    Location
    Essex, UK
    Posts
    2,636
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Current Menu Link

    I'm using the menu here - http://tutorials.alsacreations.com/rollover_unique/

    I wish to mark the current page link on the menu, by providing it with the same look as if it were being hovered over. It doesn't seem to be working though, I'm sure it's just an ordering of id's or something...

    HTML-
    PHP Code:
    <ul>
    <
    li><a id="menu1" title="Home" accesskey="1" href="index.html">Home</a></li>
    <
    li id="cu"><a id="menu2" title="Location" accesskey="2" href="location.html">Location</a></li>
    <
    li><a id="menu3" title="Facilities" accesskey="3" href="facilities.html">Facilities</a></li>
    <
    li><a id="menu4" title="Local Attractions" accesskey="4" href="attractions.html">Local Attractions</a></li>
    <
    li><a id="menu5" title="Gallery" accesskey="5" href="gallery/">Gallery</a></li>
    <
    li><a id="menu6" title="Terms &amp; Rates" accesskey="6" href="rates.html">Terms &ampRates</a></li>
    <
    li><a id="menu7" title="Contact" accesskey="7" href="contact.html">Contact</a></li>
    </
    ul
    CSS -
    Code:
    /* Hover Link Styles */
    #sidebar a#menu1:hover {background-position: 0% -326px;}
    #sidebar a#menu2:hover {background-position: 0% -356px;}
    #sidebar a#menu3:hover {background-position: 0% -386px;}
    #sidebar a#menu4:hover {background-position: 0% -416px;}
    #sidebar a#menu5:hover {background-position: 0% -446px;}
    #sidebar a#menu6:hover {background-position: 0% -476px;}
    #sidebar a#menu7:hover {background-position: 0% -506px;}
    
    /* Current Link Styles */
    #cu a#menu2 {background-position: 0% -356px;}
    As you see, I'm trying to use 'cu' to mark the current link.

  • #2
    New Coder
    Join Date
    Dec 2004
    Location
    Minnesota
    Posts
    69
    Thanks
    0
    Thanked 0 Times in 0 Posts
    How about trying to access it like so:

    li#cu a {
    color: green;
    }

    maybe
    “That rug really tied the room together. ”

  • #3
    Senior Coder
    Join Date
    Dec 2004
    Location
    Essex, UK
    Posts
    2,636
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Erm, no offence but I can see that wouldn't work at all for what I want to do...

  • #4
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    Mark can you post a link to the page that you are working on?

  • #5
    Senior Coder
    Join Date
    Dec 2004
    Location
    Essex, UK
    Posts
    2,636
    Thanks
    0
    Thanked 0 Times in 0 Posts
    OK, just temporarily here - Link Not Needed Anymore
    Last edited by mark87; 12-10-2005 at 12:15 AM.

  • #6
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    This should work
    Code:
    /* Current Link Styles */
    #cu a#menu1 {background: transparent url(palm.jpg) 0% -326px no-repeat;color:#FFF}
    #cu a#menu2 {background: transparent url(palm.jpg) 0% -356px no-repeat;color:#FFF}
    #cu a#menu3 {background: transparent url(palm.jpg) 0% -386px no-repeat;color:#FFF}
    #cu a#menu4 {background: transparent url(palm.jpg) 0% -416px no-repeat;color:#FFF}
    #cu a#menu5 {background: transparent url(palm.jpg) 0% -446px no-repeat;color:#FFF}
    #cu a#menu6 {background: transparent url(palm.jpg) 0% -476px no-repeat;color:#FFF}
    #cu a#menu7 {background: transparent url(palm.jpg) 0% -506px no-repeat;color:#FFF}

  • #7
    Senior Coder
    Join Date
    Dec 2004
    Location
    Essex, UK
    Posts
    2,636
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thanks.


  •  

    Posting Permissions

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