Go Back   CodingForums.com > :: Client side development > HTML & CSS

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 01-30-2013, 01:08 PM   PM User | #1
kcoulton30
New to the CF scene

 
Join Date: Jan 2013
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
kcoulton30 is an unknown quantity at this point
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.
kcoulton30 is offline   Reply With Quote
Old 01-30-2013, 01:33 PM   PM User | #2
Frankie
Regular Coder

 
Join Date: Sep 2011
Posts: 283
Thanks: 3
Thanked 32 Times in 32 Posts
Frankie is an unknown quantity at this point
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....
__________________
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.

Last edited by Frankie; 01-30-2013 at 01:41 PM..
Frankie is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 07:08 AM.


Advertisement
Log in to turn off these ads.