SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Member
    Join Date
    Apr 2009
    Posts
    12
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Current page indicator

    I'm looking for a Javascript workaround that'll allow me to indicate the current page on the main menu(basically, the menu button for that page will be a different colour to the rest of the menu buttons).

    The main menu is in CSS but isn't bringing up the required image for the "current menu item" indicator automatically and no one knows why.

  2. #2
    Unobtrusively zen silver trophybronze trophy
    paul_wilkins's Avatar
    Join Date
    Jan 2007
    Location
    Christchurch, New Zealand
    Posts
    14,702
    Mentioned
    101 Post(s)
    Tagged
    4 Thread(s)
    Here's one technique, where with specially crafted CSS for your menu, you only need to change the identifier on the <body> element to specify a different current page for your menu.

    ID Your Body For Greater CSS Control and Specificity
    Programming Group Advisor
    Reference: JavaScript, Quirksmode Validate: HTML Validation, JSLint
    Car is to Carpet as Java is to JavaScript


Bookmarks

Posting Permissions

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