Create a button in the main nav

  • Author
    Posts
  • #106180

    In Septera – I’m trying to create a button out of one of the main menu items by using CSS to style it with a bright-colored background and rounded edges. But for some reason, I cannot over-ride the ‘line-height’ that is set in the customizer. I’ve tried everything and the button is always 100% of the height of the main menu navbar. Any thoughts on how to style a single link in the main nav? Thanks, kevin

    Website: In%20Development

    #106294
    Zed
    Cryout Creations Team

    The line-height and height are applied to both the list element (menu item) and the inner anchor and span.
    However, I’d advise against changing the (line-)height of the list element – try applying your styling on the inner span only: #access li.menu-item-XYZ > a > span { }


    If you like our creations, help us share by rating them on WordPress.org.
    Please read the available documentation and search the forums before posting.
    #106303

    AH. Okay. That works. I had to adjust the “display” selector to remove the inherited height. Thanks for clarifying!

    Website: In%20Development

Viewing 3 posts - 1 through 3 (of 3 total)

You need to log in to reply to this topic.