Jump to content

Underline on Hover for Main Navigation

Go to solution Solved by tuanphan,

Recommended Posts

  • Solution

Add to Home > Design > Custom CSS


.Header-nav-item:hover {
   border-bottom: 1px solid #ff0000;
}

Reference: https://beaverhero.com/brine-template-squarespace/#UnderlineNavigationon_Hover@LauraAmber

Edited by tuanphan
Initial Revision

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

Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)

Link to comment
  • 1 year later...

Hi - I've been trying to get this to work and have used the code Taun Phan provided here, as well as the code below and can't seem to get it to work.

.Header-nav-item::after {
content: '';
background: #000;
height: 2px;
width: 0;
display: block;
margin-top: 2px !important;
transition: width 1s;
}

My website is www.calligrapran.com. Thanks!

Link to comment
8 hours ago, Praneetha said:

Hi - I've been trying to get this to work and have used the code Taun Phan provided here, as well as the code below and can't seem to get it to work.


.Header-nav-item::after {
content: '';
background: #000;
height: 2px;
width: 0;
display: block;
margin-top: 2px !important;
transition: width 1s;
}

My website is www.calligrapran.com. Thanks!

Use this CSS

.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

Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)

Link to comment
  • 2 years later...
On 9/19/2023 at 7:36 AM, 67Chevy said:

Is it possible to slow down the decoration so that the underline appears more gradually?

Change code to this

.header-nav-item a:hover {
    text-decoration: underline;
}
.header-nav-item a:hover, .header-nav-item a {
    transition: all 0.5s ease !important;
}

 

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

Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)

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.