Sub-menu font size with child theme

Support Area Forums Forward Sub-menu font size with child theme

Viewing 6 posts - 1 through 6 (of 6 total)
URL to the page in question: http://nufi.org/wp/
  • Author
    Posts
  • #30496
    Henry Morris
    Participant

    Hi Bill,
    the code doesn’t seem to be working anymore.

    .flexnav li ul li {
    font-size: 12px;
    }

    Not sure if it’s because of child theme but size doesn’t change anymore.

    #30502
    Bill Robbins
    Moderator

    Good Morning Henry,

    That would likely be true inside a child theme. The way CSS works, the last loaded style will be the one that’s applied to an element. The Custom CSS area is loaded last in the theme’s header so it’s what would take precedence, but a child theme’s file is loaded earlier. Because of that, the font options will override the size because they are loaded later.

    The way to get around that is to make the sub-menu items have a more specific selector. You might try something like this:

    
    #header #navigation .flexnav li ul li {
    	font-size: 12px;
    }
    

    See if that doesn’t do the trick in your child theme. Let me know if you have an issue there.

    Have a great day,
    Bill

    #30503
    Henry Morris
    Participant

    Hi Bill.
    no luck with this one font size still does not change
    http://nufi.org/wp/

    #30504
    Bill Robbins
    Moderator

    Let’s try targeting the link that’s inside that list item instead. See how this goes:

    
    #header #navigation .sub-menu li a {
    		font-size: 12px;
    	}
    

    Let me know if that doesn’t do the trick,
    Bill

    #30505
    Henry Morris
    Participant

    THAT WORKED!

    #30506
    Bill Robbins
    Moderator

    Splendid 🙂

Viewing 6 posts - 1 through 6 (of 6 total)
  • The topic ‘Sub-menu font size with child theme’ is closed to new replies.