Jump to content

[Share] Add a Sold dot over Image

Recommended Posts

Posted

You can follow these steps to add a Sold dot/circle over Gallery Image, like this.

image.png.e890f38bb59654c8bd4a69af35202b3a.png

#1. First, you can add a Gallery Section

#2. Next, edit Gallery section > Enable Caption

image.png.62b36a5ddecc7de907e853a1749dc07c.png

#3. Next, you add a SOLD text in the Description box

image.png.e0449e92977a53c912f4e9412229d1ec.png

#4. Use this code to Individual Page Header Injection (page where you use Gallery Image)

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.7.0/jquery.min.js"></script>
<script>
$(document).ready(function(){
    $('figcaption p:contains("SOLD")').closest('figure').addClass('sold-dot');
});
</script>
<style>
  figure.sold-dot>div {
  position: relative;
  }
figure.sold-dot>div:after {
    content: "";
    display: block;
    width: 30px;
    height: 30px;
    position: absolute;
    right: 20px;
    bottom: 20px;
    z-index: 9999;
    background-color: red;
    border-radius: 50%;
}
</style>

image.png.43698b13c2a0495e428b0d1e78d6992e.png

#5. Result

image.png.e890f38bb59654c8bd4a69af35202b3a.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!)

  • Replies 0
  • Views 615
  • 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.