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.
This website uses cookies

We use cookies to personalise content and ads, to provide social media features and to analyse our traffic. We also share information about your use of our site with our social media, advertising and analytics partners who may combine it with other information that you’ve provided to them or that they’ve collected from your use of their services.

Cookies are small text files that can be used by websites to make a user's experience more efficient.

The law states that we can store cookies on your device if they are strictly necessary for the operation of this site. For all other types of cookies we need your permission. This means that cookies which are categorized as necessary, are processed based on GDPR Art. 6 (1) (f). All other cookies, meaning those from the categories preferences and marketing, are processed based on GDPR Art. 6 (1) (a) GDPR.

This site uses different types of cookies. Some cookies are placed by third party services that appear on our pages.

You can at any time change or withdraw your consent from the Cookie Declaration on our website.

Learn more about who we are, how you can contact us and how we process personal data in our Privacy Policy.

Please state your consent ID and date when you contact us regarding your consent.