Jump to content

Archived

This topic is now archived and is closed to further replies.

Steve Webb

Custom hover/active colours for each dropdown child - NavBar

Recommended Posts

Steve Webb

Hi,

 

I am trying to find out how to change the hover background colours for each subpage in dropdown menus in the NavBar.

I have found the codes to change the background colour for all the dropdown hovers in a topic here, but I would like each of the drop downs to have their own hover and active colour.

 

Here is the site: http://imetropol.com

 

The drop down for locations on the right in the NavBar is what I am trying to change.

 

I have given each of the menu items their own custom class, but I can't figure out how to make them their own colour.

 

For example, for the 'print' hover, I have given the class 'print-nav', and I would like the hover and active states to have a blue background.

 

The 'west' will be yellow, 'studio' will be magenta, and 'design' will be green.

 

Can't find the bit of code in Chrome dev tools..

 

Someone please help!  Thanks so much in advance!

Share this post


Link to post
Share on other sites
Danny

Hi,

 

Use the following code, change the colors to your preference:

 

#site .print-nav a {
  color: red;
}
#site .west-nav a {
  color: green;
}
#site .studio-nav a {
  color: blue;
}
#site .design-nav a {
  color: purple;
}

The end result will look like this - https://cloudup.com/cpxy6aqbpB7


Please search our forums, before posting!

Share this post


Link to post
Share on other sites
Steve Webb

Hey Danny,

 

Thanks so much for the reply.

This is almost what I am after.. I am actually seeking to just change the hover background colour for each of the drop downs.

Currently, the code I have applies to the whole dropdown, and I am looking to have them each to have different coloured backgrounds on hover..  Possible?

 

Thanks again!

 

-Matt

Share this post


Link to post
Share on other sites
Danny

Try something like this:

 

#site .dropdown-menu .print-nav > a:hover {
  background-color: red;
  background-image: none;
}
 
Do the same for each of your menu items. Also, please be aware that our customisation support is limited and if you require any further CSS, you will need to do this yourself or ask your question on a CSS specific forum.

Please search our forums, before posting!

Share this post


Link to post
Share on other sites
Steve Webb

Great thanks Danny!

Share this post


Link to post
Share on other sites
Danny

No problem.


Please search our forums, before posting!

Share this post


Link to post
Share on other sites

  • Similar Content

    • gregory.guz
      By gregory.guz+
      Hi ,
      I just noticed that the color picker has stopped showing up on my PL5 site ( please see attached image ) 
      Any idea what could be causing the problem?
       
      Thanks 
      Greg

    • greatthingsllc
      By greatthingsllc+
      In Platform 5, Using Framework Section for Content , I have set the hyperlink colors in the CUSTOMIZE section.   However, none of the pages are properly displaying the link colors.   Just defaulting to black, and underline on hover.   I did not see where this would be controlled at the page level or lower
      Site    doritbrauer.com
      Thanks
      Josh

    • Grant Turck
      By Grant Turck+
      Navbar Broken on All Devices When Not Logged Into Wordpress. See screenshots attached from mobile. What is causing this issue and how do I fix? Site is venicepride [dot] org.


    • tkpagelines
      By tkpagelines+
      Hi there ,
      i would like to change the color of menu items on hover and the current menu item. Both should have the same color, but not the color given of the theme scheme.
      Any suggestions ? Maybe a css snippet ?
       
      Thanks
×