gc40 Posted August 27, 2007 Share Posted August 27, 2007 I have a top navigation on my website. It is a mouse over type navigation meaning that when you pass your mouse over, the link color changes. However, on the current page, I want the effect to be exactly the same as if it was mouse over. I got this accomplished with css. Here is the code: <ul> <li id="current"><a href="index.html"><span>Home</span></a></li> <li><a href="index.html"><span>About Us</span></a></li> <li><a href="index.html"><span>News</span></a></li> </ul> As you can see, the HOME page is carrying the id, current, meaning it will keep the mouse over effect. However, I want my navigation to change the id to current on which ever page it lands. I am also using a <?php include('navigation.php');?> file to include that navigation above, meaning it will be an included file. How would I go about making the current page hold the attribute "current" when the user lands on it, while still using a single include file for all the navigation. Link to comment https://forums.phpfreaks.com/topic/66875-site-navigation-with-selected-featureneed-help/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.