View Full Version : Menu Bar Highlight

May 17th, 2010, 11:17 AM

When you create a menubar using HTML and CSS how do you get the menubar to highlight the section of the website that you are in? For instance on the www.sainsburys.co.uk website the section of the website that you are in appears in the menubar with a darker shade of orange.

The menu bar that I would like to implement this with is located here: www.devoteddomains.com.

Thanks in advance,

May 17th, 2010, 12:44 PM
Take a look at http://www.codingforums.com/showpost.php?p=605564&postcount=3

May 18th, 2010, 11:36 AM
Thanks, but my body tag is locked in a template I am using for the site so I can't make the body tag unique to each page, any other suggestions?

May 18th, 2010, 12:53 PM
Have you got any permission to edit the html of the menubar?

May 18th, 2010, 01:22 PM
Yes, I have put the menubar in a template myself.

May 18th, 2010, 01:51 PM
Then you could dynamically assign(using PHP) an attribute, say class="selected" on the list item/anchor based on the requested page in the url.