Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New Coder
    Join Date
    Jan 2006
    Posts
    68
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Include File: Navigation Help

    Hello,
    I have the following navigation on my page:
    Code:
    <ul>
    <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>
    </ul>
    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?

    Thanks,
    PoJ

  • #2
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    Read this
    http://bonrouge.com/~current2

    Also you can't use an id more than once. If you must use the same styles then use a class.
    ||||If you are getting paid to do a job, don't ask for help on it!||||

  • #3
    New Coder
    Join Date
    Jan 2006
    Posts
    68
    Thanks
    0
    Thanked 0 Times in 0 Posts
    thanks for the link and info on how to properly use id tags.

    poj


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •