SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Addict
    Join Date
    Jul 2004
    Location
    charleston
    Posts
    351
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    active page, css

    hey all,

    this is a question regarding the style for a navigation. I would like to display a little graphical indicator on my navigation to let people know what page they are on right now.

    I use a <UL> for my navigation and styles with CSS. It displays fine BUT i am not sure how to get the graphical indicator to appear on other links. Here is the screenshot. The little arrow shows up on the home button. How can I code it so that when the user clicks on "about" or "contact" the little arrow will appear?

    any ideas?
    thanks
    florian
    Attached Images Attached Images

  2. #2
    In memoriam gold trophysilver trophybronze trophy Dan Schulz's Avatar
    Join Date
    May 2006
    Location
    Aurora, Illinois
    Posts
    15,476
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You need to use a class or ID on the "current page" link and target that instead of the general global rules for the menu.

  3. #3
    SitePoint Addict
    Join Date
    Jul 2004
    Location
    charleston
    Posts
    351
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I do have a class for every menu item. how do I handle the current page with my css? Thats the part I am not sure about.

    <ul class="top-nav">
    <li><a href="index.html" class="home"><span class="active">Home</span></a></li>
    <li><a href="about.html" class="about">About</a></li>
    <li><a href="search-mls.html" class="search">Search MLS</a></li>
    <li><a href="contact.php" class="contact">Contact</a></li>
    </ul>

  4. #4
    In memoriam gold trophysilver trophybronze trophy Dan Schulz's Avatar
    Join Date
    May 2006
    Location
    Aurora, Illinois
    Posts
    15,476
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    What's the rest of your page code look like then? (I'd be tempted to put the current page class on the list item, but I want to make sure it won't conflict with whatever code you may have there first.)


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
  •