1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2013
    Rep Power

    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 -

    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?

  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Specialist (4000 - 4499 posts)

    Join Date
    Jul 2003
    Rep Power
    This is really a HTML/CSS question perhaps with Javascript. It is not something you normally do with PHP so you are in the wrong forum. Also if you do not understand HTML and CSS then I suggest you start here.

    That having been said, if you are just learning HTML, frames is a bad place to start. They are obsolete in HTML 5 and discouraged in prior releases.
    There are 10 kinds of people in the world. Those that understand binary and those that don't.
  4. #3
  5. No Profile Picture
    Lost in code
    Devshed Supreme Being (6500+ posts)

    Join Date
    Dec 2004
    Rep Power
    Because you're using frames you will have to use JavaScript to change the class of the links. I've moves this over to the JavaScript forum.

    Originally Posted by Spad
    Ah USB, the only rectangular connector where you have to make 3 attempts before you get it the right way around

IMN logo majestic logo threadwatch logo seochat tools logo