Jump to content

Custom Active Nav Link

Recommended Posts

Site URL: https://sawfish-tulip-pxkb.squarespace.com/

I would like to replace the active tab underline with an image I have uploaded to my Custom CSS files. I only want it to appear when on the page and not when you hover over the links.

I've currently put in this code but can't seem to get the sizing correctly to adjust to each link and display the image at 100%. 

// active nav links
.header-nav-item:hover a,
.header-nav-item--active a {
  display: inline-block;
  position: relative;
  background-image: none !important;
.header-nav-item:hover a:after,
.header-nav-item--active a:after {
    content: '';
    position: absolute;
    width: 150%;
    height: 20px;
    left: 10%;
    bottom: -20px;
    background: url('https://static1.squarespace.com/static/611c2078e04ba63b7ce92922/t/611c461d505a25511e4aca07/1629242909476/Active+Link%402x.png');
    background-size: contain;
    background-repeat: no-repeat;


Anyone able to help?


Link to comment
  • Replies 2
  • Views 470
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted Images

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.