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 6 of 6
  1. #1
    New Coder
    Join Date
    Apr 2010
    Location
    Maidenhead, Berkshire, UK
    Posts
    21
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Menu Bar Highlight

    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

  • #2
    Supreme Master coder! abduraooft's Avatar
    Join Date
    Mar 2007
    Location
    N/A
    Posts
    14,849
    Thanks
    160
    Thanked 2,223 Times in 2,210 Posts
    Blog Entries
    1
    The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)

  • #3
    New Coder
    Join Date
    Apr 2010
    Location
    Maidenhead, Berkshire, UK
    Posts
    21
    Thanks
    2
    Thanked 0 Times in 0 Posts
    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?

  • #4
    Supreme Master coder! abduraooft's Avatar
    Join Date
    Mar 2007
    Location
    N/A
    Posts
    14,849
    Thanks
    160
    Thanked 2,223 Times in 2,210 Posts
    Blog Entries
    1
    Have you got any permission to edit the html of the menubar?
    The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)

  • #5
    New Coder
    Join Date
    Apr 2010
    Location
    Maidenhead, Berkshire, UK
    Posts
    21
    Thanks
    2
    Thanked 0 Times in 0 Posts
    Yes, I have put the menubar in a template myself.

  • #6
    Supreme Master coder! abduraooft's Avatar
    Join Date
    Mar 2007
    Location
    N/A
    Posts
    14,849
    Thanks
    160
    Thanked 2,223 Times in 2,210 Posts
    Blog Entries
    1
    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.
    The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)


  •  

    Posting Permissions

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