[Resolved] Underline on primary nagivation fit to text

Home Forums Support [Resolved] Underline on primary nagivation fit to text

Home Forums Support Underline on primary nagivation fit to text

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1297188
    Ricardo

    Hi,

    I was searching for some CSS to tweak the primary navigation text and found this on the forum:

    .main-navigation .main-nav ul li[class*=”current-menu-“] > a {
    border-bottom: 2px solid #ffffff;
    }

    Everything ok, but is it possible to define the underline to fit the text width and not the text area?

    example

    Thanks a lot!!

    #1297210
    Leo
    Staff
    Customer Support

    Hi there,

    What about something like this?
    https://docs.generatepress.com/article/adding-menu-hover-animation/

    Let me know πŸ™‚

    #1297264
    Ricardo

    Hi,

    Thank you! That gives a nice effect but it doesn’t cover all the text when you have 2 words or one big word.

    But it’s ok like that πŸ™‚

    Best regards,
    Ricardo

    #1297512
    Leo
    Staff
    Customer Support

    No problem πŸ™‚

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