02-29-2008, 11:06 PM
|
#2 (permalink)
|
|
The Frequenter
Join Date: Apr 2005
Location: South UK
Posts: 483
Thanks: 51
|
Assuming you are using PHP for this, I would do something like:
PHP Code:
<ul>
<li <?php echo ($active == 'index' ? 'id="active"' : ''); ?>><><a href="index.htm">Index</a></li>
<li <?php echo ($active == 'whats-new' ? 'id="active"' : ''); ?>><a href="whatsnew.htm">Whats New</a></li>
<li <?php echo ($active == 'about' ? 'id="active"' : ''); ?>><><a href="about.htm">About</a></li>
<li <?php echo ($active == 'why' ? 'id="active"' : ''); ?>><><a href="why.htm">Why</a></li>
<li <?php echo ($active == 'hours' ? 'id="active"' : ''); ?>><><a href="hours.htm">Hours</a></li>
<li <?php echo ($active == 'services' ? 'id="active"' : ''); ?>><><a href="services.htm">Services</a></li>
<li <?php echo ($active == 'contact-us' ? 'id="active"' : ''); ?>><><a href="contact.htm">Contact Us</a></li>
<li <?php echo ($active == 'latest-news' ? 'id="active"' : ''); ?>><><a href="newsletter.htm">Latest News</a></li>
</ul>
Then just set the $active variable at the top of each page.
If you're not using PHP to do this, then I'm afraid I have no idea - could probably do something fancy in javascript to do it.
Alan
|
|
|