Bullet In Only Active Menu

Discussion in 'CSS' started by zahidprimex, Sep 6, 2009.

  1. #1
    Hello friends
    I want to create a css menu in my site like this;

    Home
    Tips (Main Menu)
    Windows Tips (sub Menu)
    Linux Tips (sub Menu)
    Registry Tips (sub Menu)
    Contact

    I want to show bullet only in active menu like when I am on Contact Page then bullet will be shown only in Contact.When I am in Linux Tips then bullet will be shown only on Linux Tips not On Tips

    How can I do it? Plz somebody help.It's very important.
     
    Last edited: Sep 6, 2009
    zahidprimex, Sep 6, 2009 IP
  2. ceban

    ceban Peon

    Messages:
    21
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #2
    With PHP (or ASP, etc...) you can switch a css class that adds the bullet based on what page is active. Can't immagine other "dynamic" solution.
     
    ceban, Sep 7, 2009 IP
  3. wd_2k6

    wd_2k6 Peon

    Messages:
    1,740
    Likes Received:
    54
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Yeah you can add a class for the active page like:
    <ul>
    <li class="active"><a href="#">Link Text</a></li>
    <li><a href="#">Link Text</a></li>
    <li><a href="#">Link Text</a></li>
    </ul>
    Code (markup):
    Then inside your CSS you can refer to it like:
    
    ul li.active a { show bullets here }
    Code (markup):
     
    wd_2k6, Sep 7, 2009 IP
  4. HighRankingSEO

    HighRankingSEO Well-Known Member

    Messages:
    423
    Likes Received:
    9
    Best Answers:
    0
    Trophy Points:
    125
    #4

    I second this. You can do it with just CSS, no need for anything else to do it.
     
    HighRankingSEO, Sep 7, 2009 IP
  5. SeoStuff

    SeoStuff Peon

    Messages:
    61
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    I think you can use javascript as well.Page which is currently loaded can have different background which will make it apper different from other links of menu.
     
    SeoStuff, Oct 21, 2009 IP