PDA

View Full Version : Menu Bar Highlight



peterbisset
May 17th, 2010, 10:17 AM
Hi,

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,
Peter

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

peterbisset
May 18th, 2010, 10: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?

abduraooft
May 18th, 2010, 11:53 AM
Have you got any permission to edit the html of the menubar?

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

abduraooft
May 18th, 2010, 12: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.