Archived

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

  • 0

NavBar Hover Color


Question

Posted · Report post

Hi,

I want to change the color of the text in the NavBar when you hover over it from white to pink (#ff0099). I have tried loads of different CSS and nothing is working.

www.audaciousgroup.com

Help?

Thanks,

Ginny

Share this post


Link to post
Share on other sites

17 answers to this question

Posted · Report post

Hello! I need a little help,

 

 I need to change the dropdown menu color when the mouse is over the sub options of the navbar. I've added the codes which were mentioned above, but it changes the main part of the navbar.

 

 I've also changed the color in the line code 136 /sections/navbar/style.less, but it didn't make any difference.

 

 Is there a way i can change the hover color of the navbar sub options?

 

Thanks!

Share this post


Link to post
Share on other sites

Posted · Report post

Thank you! That did it!

Share this post


Link to post
Share on other sites

Posted · Report post

joareis,

 

Please open a new topic of your own and we'll address your issue there.  Thanks.

Share this post


Link to post
Share on other sites

Posted · Report post

Is there a way to make the color change depending on which page you are hovering over?

Share this post


Link to post
Share on other sites

Posted · Report post

What CSS have you tried?

Share this post


Link to post
Share on other sites

Posted · Report post

I don't actually remember. I used firebug to experiment with lots of things but deleted it when it didn't work.

Share this post


Link to post
Share on other sites

Posted · Report post

Hi ginnywills

Please you can try with


.dropdown-menu li > a:hover, .dropdown-menu li > a:focus, .dropdown-submenu:hover > a, .dropdown-menu li.current-menu-item > a {background-color: red;

 background-image: none;

 background-repeat: repeat-x;}

Share this post


Link to post
Share on other sites

Posted · Report post

You can precede the code with .page-id-xx where xx is the actual page ID set by WordPress.


.page-id-22 .navbar .navline > li > a:hover { background-color:transparent;

color: rgba( 128, 128, 128, 0.9);

text-decoration:none;

}

This code above would change the color for page 22 only.

If you want multiple pages with individual colors, you need to copy and edit the code for each. However, if you have 2 pages that will use the same color, you may prefix with .page-id-23, .page-id-27 ... which changes the color for both pages 23 and 27 to the one you desire.

Share this post


Link to post
Share on other sites

Posted · Report post

The topic was marked as resolved.

Share this post


Link to post
Share on other sites

Posted · Report post

I tried that but that does not do anything. Its not actually a drop down menu. Does that matter?

www.audaciousgroup.com

Ginny

Share this post


Link to post
Share on other sites

Posted · Report post

Hi - sorry. Its not totally resolved!

The code you gave me works to change the color when you hover, but assigning a page id does not change just that page, it changes them all. Is there a way to have one page be pink when you hover, one be blue, etc?

Share this post


Link to post
Share on other sites

Posted · Report post

Hi again

Please you can try with

.navbar .navline > li > a:hover { color: red;}

You may also use color codes there, such as #C00000 , if you wish to use more specific colors.

Share this post


Link to post
Share on other sites

Posted · Report post

.navbar .navline > li > a:hover { background-color:transparent;

color: rgba( 155, 130, 155, 0.9);

text-decoration:none;

}

Now the numbers in the rgba are purple. Change them to any numeric value for the color you prefer.

For more color codes: http://www.december.com/html/spec/colorrgbadec.html

1 person likes this

Share this post


Link to post
Share on other sites

Posted · Report post

Hello? Anyone there?

Share this post


Link to post
Share on other sites

Posted · Report post

Hi,

The code Rob provided does indeed work and shouldn't work on all pages. Please bear in mind that the you will need to copy this custom CSS for each page you wish to have different styling on.

For example:


// Works only on your Home page
.home .navbar .navline > li > a:hover { background-color:transparent; color: pink; }

// Works only on your Blog page
.blog .navbar .navline > li > a:hover { background-color:transparent; color: pink; }

// Works only on the page that has an id of 100
.page-id-100 .navbar .navline > li > a:hover { background-color:transparent; color: purple; }

// Works only on the page that has an id of 200
.page-id-200 .navbar .navline > li > a:hover { background-color:transparent; color: orange; }
[/CODE]

Therefore, you're going to need to find all your page ID's, as these are different per site, so we can not provide them for you. To find your Pages ID, the easiest method is to use either FireBug for FireFox or Google Chromes Web Dev tool and inspect your site's body class (see image). If you view your different pages, this body classes page-id-X will change to your Pages ID.

http://screencast.com/t/0XWqVl3UQaF3

1 person likes this

Share this post


Link to post
Share on other sites

Posted · Report post

I think I have not made my request clear. I have the following code in there now. page id 7 is the WHY page and page id 102 is the HOW page. This makes it hovers pink or blue depending on which page I am on.

.page-id-7 .navbar .navline > li > a:hover {

background-color: transparent;

color: #ff0099;

text-decoration: none;

}

.page-id-102 .navbar .navline > li > a:hover {

background-color: transparent;

color: #0099ff;

text-decoration: none;

}

What I want is for it to change to pink when you hover over WHY and blue when you hover over HOW no matter what page you are on. Is that possible?

Thanks,

Ginny

Share this post


Link to post
Share on other sites

Posted · Report post

Hi Ginny

Yeah you can change the colors site wide for the hover element. It looks like you have the correct code as well. Currently everything on your site is changing to pink on hover, so you've managed to put some effective Css in.


.page-item-7 .navbar .navline > li > a:hover {

    color: #insert color;

}

.page-item-102 .navbar .navline > li > a:hover {

    color: #insert color;

}


Share this post


Link to post
Share on other sites