WordPress.org

Support

Support » How-To and Troubleshooting » Using background images with dynamic menu highlighting

Using background images with dynamic menu highlighting

  • ianbarker
    Member

    @ianbarker

    I have created a menu using background images within a list instead of using text. I have an unvisited state, a hover state, and a state to indicate that you are on that menu choice’s page.

    In a normal web page, I can change the state on each page to indicate the page the visitor is on by using in-line CSS. But with WP, I have to use dynamic menu’s to call the page. I’ve tried doing this but the only method I can find is with a text menu. But I am using images that have to be called individually.

    I understand from the tutorial that I need to insert an internal CSS into header.php to change the menu state of the current page. It gives this code:


    <style type="text/css">
    #<?php echo $current; ?> {
    background-color: yellow;
    }
    </style>

    But I need to specify a different current state depending on the page (Home, About Us, Support, Resources). How do I do this? How do I give a different CSS command depending upon the current page?

    You might be able to understand what I’m saying if you go to my website (www.ianandjocelyn.com/)

Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Using background images with dynamic menu highlighting’ is closed to new replies.