Jump to content

Underlining Menu Nav of Dropdown

Go to solution Solved by tuanphan,

Recommended Posts

Just an underline or same underline effect like as dropdown items? Use this CSS code

div.header-nav-item>a:hover {
    text-decoration: underline;
}

 

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

How to: Setup Password & Share url Insert Custom CSS - Page Header - Upload Custom Font - Upload File - Find Block ID - Contact Customer Care

Link to comment
On 8/3/2023 at 5:11 AM, tuanphan said:

Just an underline or same underline effect like as dropdown items? Use this CSS code

div.header-nav-item>a:hover {
    text-decoration: underline;
}

 

Thank you works.  What would be the code to have the same underline effect where it hovers across as the others?

Link to comment
  • Solution
On 8/5/2023 at 7:59 AM, SteveWeb2023 said:

Thank you works.  What would be the code to have the same underline effect where it hovers across as the others?

Remove code I sent & use this new code

div.header-nav-item>a:before {
    content: '';
    position: absolute;
    width: 100%;
    height: 1px;
    left: 0;
    bottom: 0.1em;
    background-color: currentColor;
    transform: scalex(0);
    transform-origin: right;
    transition: transform .6s cubic-bezier(.19,1,.22,1);
}
div.header-nav-item>a:hover:before {
    transform: scalex(1);
    transform-origin: left;
}
div.header-nav-item>a {
    text-decoration: none !important;
}

 

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

How to: Setup Password & Share url Insert Custom CSS - Page Header - Upload Custom Font - Upload File - Find Block ID - Contact Customer Care

Link to comment
On 8/7/2023 at 4:27 AM, tuanphan said:

Remove code I sent & use this new code

div.header-nav-item>a:before {
    content: '';
    position: absolute;
    width: 100%;
    height: 1px;
    left: 0;
    bottom: 0.1em;
    background-color: currentColor;
    transform: scalex(0);
    transform-origin: right;
    transition: transform .6s cubic-bezier(.19,1,.22,1);
}
div.header-nav-item>a:hover:before {
    transform: scalex(1);
    transform-origin: left;
}
div.header-nav-item>a {
    text-decoration: none !important;
}

 

Amazing!! Thank you so much this was a huge help 🙂

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.