Archived topic
Navigation current
16 replies · Started by chris on February 21, 2023
Hi im really struggling to target the current navigation selection, i dont want to change the colour when selected i want to increase the font-thickness instead?
Also is there a way to make the cart amount total display next to the bag icon from woocomerce? for example if the basket is empty i want it to say £0.00 next to the cart icon?
Hi there,
i want to increase the font-thickness instead
Give this CSS a shot:
.main-navigation .main-nav ul li[class*="current-menu-"] > a {
font-weight: 700;
}
Adding CSS: https://docs.generatepress.com/article/adding-css/
Also is there a way to make the cart amount total display next to the bag icon from woocomerce? for example if the basket is empty i want it to say £0.00 next to the cart icon?
Please open a new topic for the separate question.
Thanks!
Hi that CSS didnt seem to work i tried it before posting, it comes up with "[class*="current-menu-"]" in red writing
I already tested it and that CSS will absolutely work. Don't worry about the red writing.
Ok i have put the css but didnt work not sure why sorry
It is working:
https://www.screencast.com/t/SRebIc4tn
The value 700 is overwriting the original 500.
The visual difference is small though.
Is there a way to make the currently tab writing visually bolder another way? i cant seem to tell any difference even trying different values, sorry Leo
The font you are using only goes up to 700:
https://fonts.google.com/specimen/Comfortaa
You can make the non-active state 300 instead of 500 in the customizer to see more differences.
I see now the tiny change, is it possible to apply the same font but bold version to only be applied on current?
Could i just change the font-family or something with the css you gave me?
is it possible to apply the same font but bold version to only be applied on current?
Not sure if I understand this request - My CSS already does that and it's working from what I can see.
It does, but what i mean is to use another font eg
current font: Mont-ExtraLightDEMO
Desired font : Mont-HeavyDEMO
For the current menu item only? That's a very unusual approach.
If so you can add the font-family property to my CSS:
https://www.w3schools.com/cssref/pr_font_font-family.php
Managed to do everything else i have wanted to design wise at this point but apply a new font to a :current nav item im struggling with.
Hi there,
try this CSS:
.main-navigation .main-nav ul li[class*="current-menu-"] > a {
font-family: monospace;
}
Just change the monospace to the font-family you want
Cheers David never thought to work around the issue i was scratching my head at, for anyone else whos reading fixed with:
.main-navigation .main-nav ul li[class*="current-menu-"] > a {
font-weight: 700;
text-shadow: 0px 0 3px;
}