• 0
Sign in to follow this  
Followers 0

Navbar submenu hover and active color


Question

Posted · Report post

Hi there,

I'm using a fixed navbar and one of the menu options has a dropdown submenu.

The hover and active color for the main part of the menu seems to come from the link color (red) which is great. The submenu options from the dropdown part are blue on hover and when active.

[attachment=1659:sub menu issue.jpg]

Where is this blue set?? I don't want it to be blue it needs to be red the same as the main part of the menu.

I'm using DMS Version: 1.0.4 and have set up a child theme. I've had a look at the DMS less colors file but not sure if it is being set there or not?

Many thanks in advance.

Share this post


Link to post
Share on other sites

9 answers to this question

  • 0

Posted · Report post

re  the weird 'broken site' issue - I've copied over a backup copy of my child theme's style.less replacing the one I'd been editing and all is back to normal. :)

 

All I can think is maybe something wasn't correct with the syntax of my style.less, the site did look like it was missing styles when logged into WP.

 

Hope this helps someonelse along the way :)

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

Hi MissT - You'll want to modify the following code to adjust the drop down hovers:

 

.dropdown-menu li > a:hover, .dropdown-menu li > a:focus, .dropdown-submenu:hover > a, .dropdown-menu li.current-menu-item > a 

 

There is a background image currently being set with a gradient background-image: -moz-linear-gradient(center top , rgb(0, 0, 0), rgb(0, 114, 253)) and also a background-color. Override those settings in your custom CSS.

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

Thanks for that. 

 

I'm setting up this child theme as a basic starting point for developing multiple more involved themes from this theme.  I'd prefer to amend the less at the highest possible level within my child theme so that it is set by the same variable as the main link color.  Can anyone confirm where this blue is being set in the less please?

 

Many thanks.

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

You can add the following to your child themes style.less file.

 

@dropdownLinkBackgroundHover: Color Hex Here;
@dropdownLinkBackgroundActive: Color Hex Here;

 

Add your color value and thats it, what you have done is overridden the default dropdown variable.

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

Thanks Danny.  I came across this by chance when reading another forum post and thought it might be useful for other who come across this too.

 

http://www.pagelinestheme.com/navbar-dropdown-colors/

 

I can't test it as I now have a 'broken' site when logged into WP - I've commented on another post where others have had the same thing. Weird.

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

Hello MissT 

 

Please could you create an admin level account for your Wordpress install and send the credentials to hello @ pagelines.com and we will jump on and take a look at the site for you. 

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

Hi Martin, it's local on my machine so that won't be possible sadly.

 

I'm thinking of removing and re-installing DMS and my child theme and see it that solves it.  I'm also wondering if I may have mucked something up in the style.less as that's what I was doing when it went odd. I'll have a tinker and post back shortly.

 

Thanks anyway! :)

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

I've tested the dropdown colour code on another site and child theme style.less and this works for me - I've used @linkColor instead of 'hard coding' the hex colour as I want it to just use the link colour selected in the Color & Style settings within the Global settings.

 

// PL override LESS Variable: will not work in PL DMS Editor's Custom Code area
// https://github.com/pagelines/DMS/blob/Dev/less/dropdowns.less#L88
@dropdownLinkBackgroundHover: @linkColor; // drop down hover color
@dropdownLinkBackgroundActive: @linkColor; // drop down active item / current page color

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

It's very kind of you to think of others. Thank you for doing that.  :)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0