Jump to content

[Share] Add an icon in Corner of Gallery Image

Recommended Posts

Suppose you want to add an icon like this to a corner of Gallery Section Images.

image.png.a3ab3a57ed3dd7f1e22dc79571f21cb3.png

#1. First, you need to find ID of Gallery Section.

In my example, we will have: section[data-section-id="65e0ebffbf13c3601b617515"]

image.png.f6dc4232dbae0797d0a54adc0903b061.png

#2. Next, use CSS code like this to Custom CSS box

section[data-section-id="65e0ebffbf13c3601b617515"] figure.gallery-grid-item:before {
    content: "";
    background-image: url(https://cdn.pixabay.com/photo/2020/02/11/10/24/sea-4839056_1280.jpg);
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center center;
    width: 20px;
    height: 20px;
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 999999;
}
figure.gallery-grid-item {
    position: relative;
}

image.png.c71331717962ac3bcf06cc965fd0bc99.png

Replace Pixabay with your desired icon url. Follow this to find URL.

#3. If you want to apply for all gallery grid images, you can use this new code

figure.gallery-grid-item:before {
    content: "";
    background-image: url(https://cdn.pixabay.com/photo/2020/02/11/10/24/sea-4839056_1280.jpg);
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center center;
    width: 20px;
    height: 20px;
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 999999;
}
figure.gallery-grid-item {
    position: relative;
}

 

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
  • Replies 0
  • Views 468
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

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.