Quick Search
Sunbelthost Hosting - Colocation and Dedicated Servers

Threads: 21,763
Posts: 83,205
Members: 24,315
Newest member: joemccue

Web Hosting


 
  #1  
Old 01 Sep 2009, 01:58 AM
polaris polaris is offline
Newbie
 
Join Date: Sep 2009
Posts: 2
How do you make a link to a page change color when you're on that page?

For instance, if I'm on the "services" page, the link on the top navigation named "services" should have a different color from the rest. I'm using php includes for the top navigation so all pages only share one top navigation.

I tried creating a class for each link and defining their a:link property on the css but the default links still don't change whenever I'm on a particular page. I tried changing their a:hover/a:active links and they work properly. The only time there is no change is when I use a:link.

Reply With Quote
  #2  
Old 01 Sep 2009, 09:21 PM
mikewgd's Avatar
mikewgd mikewgd is offline
Established Member
 
Join Date: Oct 2008
Location: NJ
Posts: 98
I think this is what you are looking for: http://hubpages.com/hub/PHP-and-CSS-menu
__________________
Reply With Quote
  #3  
Old 01 Sep 2009, 10:46 PM
aeroweb99's Avatar
aeroweb99 aeroweb99 is offline
Do as I say, not as I do!
 
Join Date: Feb 2008
Location: Michigan, USA
Posts: 540
Basically you would have inter page css for the link relative to that page. So if your on the contact page, you would put a css rule in the head section of that page, for that link. Hard to explain.

Here is a page I found that may explain better.
__________________
Steve,

Aero Web Design

Man I hate being dumb!
Reply With Quote
  #4  
Old 02 Sep 2009, 01:28 AM
Wickham's Avatar
Wickham Wickham is offline
Established Member
 
Join Date: Feb 2006
Location: Salisbury UK
Posts: 3,865
Another tutorial here:-
http://www.wickham43.net/highlighthome.php
__________________
Code downloaded to my PC will be deleted in due course.
WIN XP SP3; IE7, Firefox 3.5, Opera and Safari for Windows; screen resolution usually 1024x768.
IE6 on W98 with 800*600. IE8 RTM on Vista 1440*900.
Reply With Quote
Reply

Thread Tools

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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Want to make a page template to avoid retyping for every page... HRK Web Design, HTML Reference and CSS 4 13 Apr 2007 10:25 PM


All times are GMT -5. The time now is 01:25 PM.


 

Powered by vBulletin® Version 3.8.3
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Forums Copyright © 2004-2010, WebDevForums.com. Web design by Miami Web Design. All Rights Reserved.