Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I'm trying to override the default text color for my menu. I have created a custom .css file for nice-menus based off of the template provided with the module. I have tried editing both of these fields but it isn't changing the color:
ul.nice-menu,
ul.nice-menu ul {
list-style: none;
padding: 0;
margin: 0;
color: #fff
border-top: none;
}
ul.nice-menu li {
border: none;
border-top: 0;
color: #fff;
float: left;
background-image: url(menu_button_1.png);
background-position: 0;
margin: 0;
padding-left: 0;
}
However, When I edit the color for the hover effect it does change the text cover when the mouse is rolled over the menu item, such as:
ul.nice-menu li a:hover {
border: none;
border-top: 0;
float: left;
margin: 0;
padding-left: 0;
color: #000;
background-image: url(menu_button_2.png);
background-position: 0;
height: 16px;
width: 124px;
}
Comments
Comment #1
add1sun CreditAttribution: add1sun commentedThe default nice menus CSS does not set the link colors anywhere and instead lets the theme take care of that so you need to add the rules in for that. The reason the second one worked and the first two didn't is because you need to set the color property on the "a" element and not the "ul".
Try making one for "ul.nice-menu li a" and set the color there.
Comment #2
Caveman Concepts CreditAttribution: Caveman Concepts commentedThe style needed to change the text color is already in the default style sheet;
ul.nice-menu a {
padding: 0.3em 5px 0.3em 5px;
}
Just add your text color to this. If you want white text, it would look like this;
ul.nice-menu a {
padding: 0.3em 5px 0.3em 5px;
color: #FFFFFF;
}
Comment #3
add1sun CreditAttribution: add1sun commentedNO word back from OP in weeks. Closing as fixed.
Comment #4
Anonymous (not verified) CreditAttribution: Anonymous commentedAutomatically closed -- issue fixed for two weeks with no activity.