Active Link?

MrD

New Member
I apologize. The term I used is very vague. However, I don't know how else to explain it!

Here is what I've seen on many sites and want to know if there is an easy script to do it.

For example, you have a navigation area. The link for the page you're on has a blue background in this navigation area. The rest of the images have a red background. When you click to another page, the link that corresponds to the page you're on gets the blue background.

It has to be a lot simpler than what I came up with -- using PHP case switches to change the navigation area according to the variable that you $_GET. I think that way is over complicated, and I know AJAX applications like jQuery have the ability to add CSS classes dynamically, so maybe I'd do a case switch that would add a class to the link that corresponds to the page you're on.

But I still believe there is a freeware script or solution that is less complicated and already done (because anytime I put into extra coding costs me money on other projects), so if anyone has an answer I'd appreciate it.
 

Digital4 Media

New Member
Might be worth looking at:
http://www.13styles.com/css-menus/gloss/

This tutorial / download is of a menu which is styled by CSS and the html simply consists of an unordered list <UL> there is an option for 'current' that is simply a class in the css:

ie.
HTML:
	<li class="current"><a href="#"><span>Home</span></a></li>
	<li><a href="#ourwork"><span>About</span></a></li>

This should get you well on your way with this
 
Top