March 20, 201016 yr Hello all. I hope you can help me. I'm trying to add a background to indicate the current page of my links in the left hand nav bar of my website. I've managed to acheive this in my horizontal nav bar, but no joy in my left nav bar. I haven't actually created a 'class' for it at the moment because since it didn't work, I deleted it. Could someone give me some advice? http://www.beautyboxworcester.co.uk Thanks very much all!!
March 20, 201016 yr You're actually using a long-winded method for the top menu. The home page has <li><a href="index.html" class="current">Home </a></li> and the about page has <li><a href="#" title="about us" class="current">About </a></li> so you are changing the position of class="current" on every page. If you use the "matched pairs" principle you can have the same menu code on every page, and then put it all in a PHP "include" file so that you only edit one file if your menu changes instead of editing every page. See http://www.wickham43.net/highlighthome.php the second example (the first is what you have now). The third example is the same as the second, but with image buttons. Then do the same for the side menu.
March 21, 201016 yr Author You're actually using a long-winded method for the top menu. The home page has <li><a href="index.html" class="current">Home </a></li> and the about page has <li><a href="#" title="about us" class="current">About </a></li> so you are changing the position of class="current" on every page. If you use the "matched pairs" principle you can have the same menu code on every page, and then put it all in a PHP "include" file so that you only edit one file if your menu changes instead of editing every page. See http://www.wickham43.net/highlighthome.php the second example (the first is what you have now). The third example is the same as the second, but with image buttons. Then do the same for the side menu. Cheers mate thats great!
Create an account or sign in to comment