Jump to content

How to change width of custom underline on nav dropdown?

Recommended Posts

Posted

Site URL: https://www.thebevystore.online/shop-bevy

Hello, 

I have a custom nav underline but on dropdown it extends further than I would like it to (see screenshot). I would like to shorten the length of it but can't figure out how to do this. I have tried width % etc. but it is not working. 

 

This is the code I have: 

.header-nav-item--active a {
   border-bottom: 4px solid #FF7CBD !important;
   background-image: none !important;
   
}

1832675826_Screenshot2021-03-30at13_47_14.png.75198ab66f9a3126eb11fd810542cf67.png

 

Anyone have any ideas? 

  • Replies 1
  • Views 1.1k
  • Created
  • Last Reply
Posted

Hi,

Use the text-decoration property instead of border-bottom 🙂 Below are some examples:

  text-decoration: underline;
  text-underline-position: under;
  text-decoration-style: solid;
  text-decoration-color: #FF7CBD;
  text-decoration-thickness: 8px;

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.