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 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Jan 2013
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Angry Oh please help - simple link colour change

    Using frames - Trying to make my navigation links in the top frame a different colour when the page is active, i.e. you click on ABOUT from a list in the top frame, the main frame changes to the About page, and the ABOUT link changes colour whilst you are on that page.

    Help for a beginner would be appreciated - i.e. simpler the better!

    I have been messing around with classes, body tags and lots of other things I don't really understand, for what seems like forever.

    Trying to basically do the first suggestion on this tutorial - http://www.impressivewebs.com/current-page-link-styles/

    The guy (or girl) says this....

    "The only thing you have to make sure of is that the location of the class gets changed depending on the page you’re on. For example, the HTML shown above would appear on the “Products” page, but on the “Contact” page the “current” class would be moved to the “Contact” link."

    ...but doesn't explain how to do it! Which is the difficult bit?!

    Any help?

    K.

  • #2
    Regular Coder
    Join Date
    Sep 2011
    Posts
    330
    Thanks
    3
    Thanked 35 Times in 35 Posts
    Quote Originally Posted by kcoulton30 View Post
    The guy (or girl) says this....

    "The only thing you have to make sure of is that the location of the class gets changed depending on the page you’re on. For example, the HTML shown above would appear on the “Products” page, but on the “Contact” page the “current” class would be moved to the “Contact” link."

    ...but doesn't explain how to do it! Which is the difficult bit?!
    That's indeed confusing, in fact incorrect, because you need php or some other server-side scripting for that, while the author says to cover an HTML+CSS method. Such a method is described a little further down the page, under 'Adding a Class to the <body>'.

    HOWEVER: that does not work if you are using frames....
    Last edited by Frankie; 01-30-2013 at 01:41 PM.
    Frank

    How to: Target IE in, Position in, Center in, Create a Fixed ('Sticky') Footer with, and Create a Drop-Down/Fly-Out Menu with CSS: Website Laten Maken Amsterdam.


  •  

    Posting Permissions

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