View Full Version : Include File: Navigation Help

01-31-2007, 04:38 PM
I have the following navigation on my page:
<li id="title"><a href="#">SEO Study on 350 Manufacturers</a></li>
<li id="current"><a href="#">Summary</a></li>
<li id="normal"><a href="#">Introduction</a></li>
<li id="normal"><a href="#">Results</a></li>
<li id="normal"><a href="#">Obstacles to Natural SEO</a></li>
<li id="normal"><a href="#">Top Placement for Targeted Search Terms</a></li>
<li id="normal"><a href="#">Manufacturers Pick The Wrong Keywords</a></li>
<li id="normal"><a href="#">Case Studies</a></li>
<li id="normal"><a href="#">Future Outlook</a></li>
<li id="normal"><a href="#">ROI Insights</a></li>
<li id="normal"><a href="#">Conclusion</a></li>

I have been placing this code on every page manually. I am doing this because when I am on a specific page, the <li> tag is given an id of "current".

The id "current" indents the list element and gives it a graphic bullet.

Is it possible to make an include file for the navigation that will automatically change the id of the selected nav item to "current" and switch the others to "normal" so that I would not have to place them manually on each page?


01-31-2007, 06:17 PM
Read this

Also you can't use an id more than once. If you must use the same styles then use a class.

01-31-2007, 07:34 PM
thanks for the link and info on how to properly use id tags.