This topic has 5 replies, 4 voices, and was last updated 10 years, 6 months ago ago by Eva Kemp
Hey Guy’s,
I have created a custom css file for my theme, and set the background of the main navigation bar to BLUE.
The primary links which are being used across the site are blue too, so obviously the navigation menu links in the main header don’t appear. Ive added the following code but for some reason an “Active” link is still blank
.fixed-header .menu > li > a, .main-nav .menu > li > a {
display: block;
font-family: Georgia;
font-size: 14px;
font-weight: 400;
padding: 13px 5px;
position: relative;
text-transform: uppercase;
color: #FFF;
}
#main-nav > ul > li.current_page_item > a {
color: #000000 !important;
}
#main-nav > ul > li > a:hover, #main-nav > ul > li > ul > li a:hover {
color: #000000 !important;
}
What I want to do is be able to set a colour of a link when a visitor is on that page. i.e. usually on most websites when you are on the current page e.g. the homepage. The menu link is a different colour.
Any help would be fab!
Regards
Tom
Hi Tom,
try the following css snippet to change the color of the current (active) menu link:
.main-nav .menu > li.current-menu-item > a {
color:#000000!important;
}
If that doesn’t work can you may post a link to your site ? that way it would be much easier to troubleshoot your problem.
an this snipped can be used to change the color of the main nav links:
.main-nav .menu>li>a {
color:#000000!important;
}
and this is for the hover state:
.main-nav .menu > li > a:hover {
color:#000000!important;
}
hope that helps ….
Hello,
Please provide us with link to your site.
Regards,
Jack Richardson
Amazing, thanks guys! That worked perfectly 🙂
Hello,
You’re welcome.
Regards,
Eva Kemp.
Tagged: active, best selling, colours, link, links, menu, themes, woocommerce
The issue related to '‘Menu Link Colours and Active Links’' has been successfully resolved, and the topic is now closed for further responses