Need Assistance With CSS Menu Display

Discussion in 'CSS' started by bwj292, Mar 26, 2010.

  1. #1
    Hi guys,

    I have a website with a menu I've built that I would like to have the 'currently active' menu link displayed with a white background, you can see the site here:

    http://storestacker.eu/sd/

    Currently I can only get the background color to work for hover.

    Any suggestions?
    Thanks
     
    bwj292, Mar 26, 2010 IP
  2. ampg-it

    ampg-it Peon

    Messages:
    75
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Try adding this to the home link

    <a href="/" style="background-color:#FFFFFF">Home</a>
     
    ampg-it, Mar 26, 2010 IP
  3. bwj292

    bwj292 Peon

    Messages:
    128
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Hi there,

    Thank you for taking the time to reply, the problem with that though is that it will only apply to the Home page link and not other active links when users are viewing other pages.
     
    bwj292, Mar 26, 2010 IP
  4. ampg-it

    ampg-it Peon

    Messages:
    75
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    You need to add that code on each page to the relevant link.

    Active only applies when you have just clicked the link, so you only see it for a very short sliver of time.
     
    ampg-it, Mar 26, 2010 IP
  5. bwj292

    bwj292 Peon

    Messages:
    128
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Okay, I think you may be misunderstanding what I'm asking, or I'm explaining it incorrectly. I have a hover style, what I want is when the top navigation link is clicked for it to have a background color of white for the time that page is viewed. This isn't a simple html site, it's based on Wordpress so uses <?php list_categories();?> to generate the links.
     
    bwj292, Mar 26, 2010 IP
  6. ampg-it

    ampg-it Peon

    Messages:
    75
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #6
    In that case you might want to try asking in the content management forum
     
    ampg-it, Mar 26, 2010 IP
  7. bwj292

    bwj292 Peon

    Messages:
    128
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #7
    It's a webdesign/css issue though, the fact it's Wordpress has nothing to do with it, it still outputs unordered lists and list items.

    Okay, no problem, thanks for trying to help.
     
    bwj292, Mar 26, 2010 IP
  8. sylverCode

    sylverCode Member

    Messages:
    74
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    43
    #8
    Have you tried this?
    #navbar a:active {background:#fff;}
    Code (markup):
     
    sylverCode, Mar 26, 2010 IP
  9. khalidfarooq

    khalidfarooq Greenhorn

    Messages:
    82
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    18
    #9
    how to change the color of addds
     
    khalidfarooq, Mar 30, 2010 IP