Jump to content

Site Navigation with Selected Feature...Need Help


Recommended Posts

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.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.