Site logo

[Resolved] Navigation current

Home Forums Support [Resolved] Navigation current

Home Forums Support Navigation current

Viewing 15 posts - 1 through 15 (of 17 total)
  • Author
    Posts
  • #2541515
    chris

    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?

    #2541567
    Leo
    Staff
    Customer Support

    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!

    #2541649
    chris

    Hi that CSS didnt seem to work i tried it before posting, it comes up with “[class*=”current-menu-“]” in red writing

    #2541655
    Leo
    Staff
    Customer Support

    I already tested it and that CSS will absolutely work. Don’t worry about the red writing.

    #2541673
    chris

    Ok i have put the css but didnt work not sure why sorry

    #2541678
    Leo
    Staff
    Customer Support

    It is working:
    https://www.screencast.com/t/SRebIc4tn

    The value 700 is overwriting the original 500.

    The visual difference is small though.

    #2541694
    chris

    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

    #2541705
    Leo
    Staff
    Customer Support

    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.

    #2541738
    chris

    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?

    #2541743
    Leo
    Staff
    Customer Support

    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.

    #2541745
    chris

    It does, but what i mean is to use another font eg

    current font: Mont-ExtraLightDEMO

    Desired font : Mont-HeavyDEMO

    #2541763
    Leo
    Staff
    Customer Support

    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

    #2542608
    chris

    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.

    #2542927
    David
    Staff
    Customer Support

    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

    #2542928
    chris

    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;

    }

Viewing 15 posts - 1 through 15 (of 17 total)
  • You must be logged in to reply to this topic.