Navbar hover color different than submenu hover color
mrhoni
Registered Users Posts: 173 Major grins
If you go to my site you can see what happens on my menu. As I right this, when I hover on the top menu, the text changes from black to white. When I hover on a sub menu item the submentu has a red background and white text, which is what I want, however I would like to be able to set the top menu hover color change from black to a color different than white.
Here is the code, pulled from this forum, I placed in the CSS for my Theme
/* Set the default navbar submenu background color */
.yui3-menu .yui3-menu-children .yui3-menu-item .yui3-menu-label {
background: #F4F1DF;
}
/* Set the navbar submenu hover background color */
.yui3-menu .yui3-menu-children .yui3-menu-item .yui3-menu-label:hover {
background: #7d1515;
}
/* Change the border color */
.yui3-menu .yui3-menu-children,
.sm-page-widget-nav .sm-page-widget-nav-popover.sm-page-widget-nav-sublinks-separator .yui3-menu .yui3-menu-label {
border-color: #7d1515;
}
/* Turn the navbar text a different color when the mouse hovers over it */
.sm-user-ui .sm-page-widget-nav-toplink a:hover {
color: #ffffff!important;
}
/* Set the color for the borders between each item of the top menu */
.sm-page-widget-nav-toplink {border-color:#7d1515 !important;}
Here is the code, pulled from this forum, I placed in the CSS for my Theme
/* Set the default navbar submenu background color */
.yui3-menu .yui3-menu-children .yui3-menu-item .yui3-menu-label {
background: #F4F1DF;
}
/* Set the navbar submenu hover background color */
.yui3-menu .yui3-menu-children .yui3-menu-item .yui3-menu-label:hover {
background: #7d1515;
}
/* Change the border color */
.yui3-menu .yui3-menu-children,
.sm-page-widget-nav .sm-page-widget-nav-popover.sm-page-widget-nav-sublinks-separator .yui3-menu .yui3-menu-label {
border-color: #7d1515;
}
/* Turn the navbar text a different color when the mouse hovers over it */
.sm-user-ui .sm-page-widget-nav-toplink a:hover {
color: #ffffff!important;
}
/* Set the color for the borders between each item of the top menu */
.sm-page-widget-nav-toplink {border-color:#7d1515 !important;}
0
Comments
Because of this. You already have a rule telling that it should be white when it's hovered.
Images in the Backcountry
My SmugMug Customizations | Adding CSS to Your Site | SEO for the Photographer | Locate Your Page/Widget Number | SmugMug Help Desk
Just wondering if there is a way for setting color on hover on top menu and different color on sub menu
http://mrhoni-photography.com
Images in the Backcountry
My SmugMug Customizations | Adding CSS to Your Site | SEO for the Photographer | Locate Your Page/Widget Number | SmugMug Help Desk
Sorry, it didn't work.
When I used "color: gray", the submenu has the correct background and text color, but the top menu color never changed
If I added !important right after "gray", then the top menu color changes to gray upon hover but also the sub menu text changed to gray.
http://mrhoni-photography.com
Images in the Backcountry
My SmugMug Customizations | Adding CSS to Your Site | SEO for the Photographer | Locate Your Page/Widget Number | SmugMug Help Desk
http://mrhoni-photography.com
Images in the Backcountry
My SmugMug Customizations | Adding CSS to Your Site | SEO for the Photographer | Locate Your Page/Widget Number | SmugMug Help Desk