Sticky header links

Hi, I use the transparent and sticky options for my header. For the transparent header, I needed to make the nav links white in order to contrast wotht he background. For the sticky one however, I needed to make the links black so I used a custom css snippet, however I wasn't able to come up with a snippet to make the links change color when hovered and when active. I was wondering if you could help me by providing me a snippet to make the sticky header links color change when hovered and when active please.

Comments

  • Hi,

    you can do this with below css:
    #Top_bar.is-sticky .menu_wrapper .menu > li > a:hover { color: #000 !important; }
    #Top_bar .menu > li.current-menu-item { color: #000 !important; }
  • Thank you!

    The snippet for the hover worked, but the one for the active link didn't :/

    Is there anything else I can do?

    Thanks!
  • If css for activate menu does not work, try below css instead:
    #Top_bar .menu > li.current-menu-item a { color: #000 !important; }
  • It was meant to be for the sticky header so i just added is-sticky next to #Top_bar. 

    It worked thank you :)
  • I have the same probleme. While Top bar ist not sticky, active menu Item ist colored in #ce3234 (I hope it is #ce3234, beacaue iÍ have no idea where I have changed it ?!)

    The following css snippet in my case don't work for changing active menu Item color in Sicky Top_Bar
    #Top_bar.is-sticky .menu > li.current-menu-item a { color: #ce3234 !important; }
    My Site - You actually only can test it with the Menu Item "Kontakt".


    Thanks for help!
  • @THP2410 Please go to your Custom CSS section and compare the code we gave above with your code and you will see where the difference is. It simply does not work because your's is different.
  • @muffingroup Thats correct, mine is different from yours beacause I added ".is-sticky" directly after #Top_bar like  Gallardooo described.


    I also tried it with your code and after that, the active menu item is also not colored differently from the others (in case of sticky menu)
  • @THP2410 Yes, this is true but as we can see, your menu items does not have links so how you want to make menu items activate if there is no links to pages? Sorry but we are not sure what you would like to do exactly.
Sign In or Register to comment.