Site logo

Archived topic

Primary Navigation Header Line Design

12 replies · Started by Tibs on May 24, 2020

Viewing posts 1–13 of 13

Hello there,

Would it be possible to add an underline hover effect? So here's how the header menu item would look without hover: http://prntscr.com/sn3ys6.

And here's how it'd look like with hover: http://prntscr.com/sn3z9s

(I've attached example of menu bar in website URL)

Thanks!

Hi there,

add this CSS to your site:

@media (min-width: 769px) {
    .main-navigation .menu > .menu-item > a::after {
        content: "";
        display: block;
        position: absolute;
        left: 20px;
        right: 20px;
        bottom: 20px;
        height: 4px;
        -webkit-transform: translateY(-10px);
        transform: translateY(-10px);
        background-color: currentColor;
        opacity: 0;
        transition: 0.3s all ease;
        pointer-events: none;
    }
    .main-navigation .menu > .menu-item.current-menu-item > a::after,
    .main-navigation .menu > .menu-item.current-menu-ancestor > a::after,
    .main-navigation .menu > .menu-item > a:hover::after {
        -webkit-transform: translateY(0px);
        transform: translateY(0px);
        opacity: 1;
    }
}

Can you link us to your site in question with David's CSS applied?

Done :)

You're the man. Thank you David!

You're welcome

Quick question David:

After I click on the menu header item, the color remains white. Is there a way where after you click on menu item, the color remains the same, like this: http://prntscr.com/sppeil

In Customizer > Colors > Primary Navigation you can set the Text Current color

Thank you!

You're welcome

This archived topic is closed to new replies.