Jump to content

Archived

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

kzaiman

DMS2 - Navbar hover color

Recommended Posts

kzaiman

In the navbar, am I able to change the color used for hover state?

Share this post


Link to post
Share on other sites
Danny

Hi,

 

To change the color of the hover state, you will need to use custom CSS.


Please search our forums, before posting!

Share this post


Link to post
Share on other sites
kzaiman

Ok, I'm having trouble figuring out exactly where to put it. Right now I've got

 

.section-navbar .navbar.pl-color-red:hover { background: #b30e38; }

 

and this isn't working. What have I got wrong?

Share this post


Link to post
Share on other sites
Danny

Try this:

 

#site .section-navbar .navbar.pl-color-red .navline > li:hover > a,
#site .section-navbar .navbar.pl-color-red .navline > li.current-menu-item > a,
#site .section-navbar .navbar.pl-color-red .navline > li.current_page_item > a,
#site .section-navbar .navbar.pl-color-red .navline > li.dropdown.open > a {
  background-color: black;
  color: green;
}

 


Please search our forums, before posting!

Share this post


Link to post
Share on other sites
kzaiman

That did the trick! Thanks again 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
selmakdesign

Hi Danny, I also want to change the hover background colour but the code you gave won't make a difference. Also, the dropdown background is blue for all nav bar themes. I'm using the black theme and was hoping for a grey background colour :) The url is: http://hatech.selmakdesign.se/

 

navbar_blue_dropdown.jpg

Thanks :)

 

Selma

Share this post


Link to post
Share on other sites
Danny

selmakdesign - The code I provided above will only effect parent menu items and if you review the code, you will notice that it has pl-color-red class. This means that if you're using any other color scheme for the NavBar, the CSS above will not take effect. However, all you need to do is replace the color-red with color-black, color-base, color-blue etc...

 

In regards to the drop downs being a different color, you will want to use the following:

 

#site .dropdown-menu li > a:hover,
#site .dropdown-menu li > a:focus,
#site .dropdown-submenu:hover > a,
#site .dropdown-menu li.current-menu-item > a {
  background-color: #333;
  background-image: none;
}
 
 
Note: Do not remove the background-image: none; from the CSS, as this is preventing the gradient from displaying via the default styling.

Please search our forums, before posting!

Share this post


Link to post
Share on other sites
selmakdesign

Brilliant, would never have figured that out on my own!  :D

Share this post


Link to post
Share on other sites
Danny

No problem. FYI, all I did was use Chromes inspection tool, if you want to become an uber ninja with that tool, I highly recommend you check out the free video and interactive course from Code School. It's quite awesome - https://www.codeschool.com/courses/discover-devtools


Please search our forums, before posting!

Share this post


Link to post
Share on other sites
kzaiman

Hello again Danny,

 

I've decided to scrap the navbar in favor of the NAVI section. I've entered the custom code below,

 

#site .section-navi .navi.pl-nav> li:hover > a,
#site .section-navi .navi.pl-nav> li.current-menu-item > a,
#site .section-navi .navi.pl-nav> li.current_page_item > a,
#site .section-navi .navi.pl-nav> li.dropdown.open > a {
  opacity:1;
  background: rgba(0,0,0,.2);
}
 
This works, but only temporarily. As soon as I work on anything else, the effect is gone. The code is still in the custom box.
Any ideas on what is causing this and/or how to correct it?
 
Thanks,
Kim

Share this post


Link to post
Share on other sites
Danny

kzaiman - Can you create your own topic as this is now related to the Navi section and not the NavBar.


Please search our forums, before posting!

Share this post


Link to post
Share on other sites

  • Similar Content

    • Lisa Haran
      By Lisa Haran+
      Hi 
      I have a map here http://www.iloveoffset.com/maps/
      I want to add several pointer locations to the map, but when I do they do not appear.
      On this map there are 2 pointer locations and as you can there is only one visible.
      Earlier today I added 7 and could only see 4 so there is something odd going on.
      My theme is up to date
    • clj182
      By clj182+
      Hello,
      I've been having trouble unlocking the template section for past couple of weeks. When I try clicking nothing happens. 
      I've deleted my custom css and removed plugins. Im down to having only the following plugins:
      Akismet
      Contact Form 7
      DMS Professional Tools
      Pagelines Updater
      WooCommerce
      It was working fine before i have no idea what's going on with it.
    • flourishdesignstudio
      By flourishdesignstudio+
      My DMS 2 site http://www.heart-stone.com/ will not save any new custom css... I can still edit templates and publish those but any custom css that I enter never saves.
      All WP files, themes, and plugins are up to date. 
      Any thought about what might be causing this?
    • flourishdesignstudio
      By flourishdesignstudio+
      Is there a way to edit the custom CSS via FTP? I know I can edit the custom code in the Chrome editor but is there a file path I can use to find and edit the CSS directly from our FTP?
      Thanks in advance for the help!
    • nizami
      By nizami+
      Using navbar section with correctly configured WP menu to display main navigation at https://elenaangel.com. 
      All fine in desktop viewport. Menu displays twice in hamburger mode. How to fix this please? 

×