Jump to content

How to add Icons next to page links in a drop down folder

Recommended Posts

  • Replies 3
  • Views 1.3k
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted Images

Use this CSS code. Repeat Similar for other items

div.header-nav-item div div a:before {
    background-size: contain;
    width: 30px;
    height: 30px;
    background-position: center;
    background-repeat: no-repeat;
    display: inline-block;
}
div.header-nav-item:nth-child(1)>div>div:nth-child(1) a:before {
    content: "";
    background-image: url(https://cdn.pixabay.com/photo/2023/08/11/06/12/boy-8182923_1280.jpg);
}
div.header-nav-item:nth-child(1)>div>div:nth-child(2) a:before {
    content: "";
    background-image: url(https://cdn.pixabay.com/photo/2023/09/17/10/17/milky-way-8258264_1280.jpg);
}
div.header-nav-item:nth-child(1)>div>div:nth-child(3) a:before {
    content: "";
    background-image: url(https://cdn.pixabay.com/photo/2023/09/30/05/06/mallard-8284909_1280.jpg);
}

image.png.ad6e398bbac64721fc2e8fe03e59203c.png

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

@tuanphan

Thank you! That worked to add the url images you included but it wont allow me to change it for some reason. I'm trying to just remove the url and add a code for the icon. 

example for the Supply Chain consulting would be : <i class="fa-thin fa-user-headset" style="color: #ffffff;"></i>

would I need to enter that in a different area of the code? 

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.