Jump to content

change colour of active page navigation


toolman

Recommended Posts

Hi there,

 

I have quite a complex script and want to have the page that is currently active in my navigation a different color or class. I can do all the css, but wanted to know if there was an easy way to do this. Maybe I could just add a line on the index page to say use this class on the active navigation.

 

Is this possible?

 

 

 

Link to comment
https://forums.phpfreaks.com/topic/188717-change-colour-of-active-page-navigation/
Share on other sites

Just add an additional class attribute to your tag

 

<li class="active"><a href="index.php">Homepage</a></li>

 

And add the CSS:

 

.active a, a:active { background: #F00; color: #000; }

 

Yes, but he/she will still need to determine the active page.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.