Jump to content

"Sold Out" Hover Detail

Recommended Posts

Site URL: https://lily-yellow-zwzc.squarespace.com/

Hi there, I have already added the following custom code to get the text hover effect found on the products on my website. 

section.grid-meta-wrapper {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    transform: translate(-50%,-50%);
    z-index: 9999;
    opacity: 0;
}
section.grid-meta-wrapper * {
    text-align: center !important;
}
figure.grid-image:after {
    content: "";
    background-color: rgba(255,255,255,0.9);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999;
    opacity: 0;
}
.grid-item:hover section.grid-meta-wrapper {
    opacity: 1;
}
.grid-item:hover figure:after {
    opacity: 1;
}

I am wondering if someone can help me get a "Sold Out" flag added to my sold products that looks similar to the attached image I have provided from this website. The password to my site is bathtub

 

Thanks in advance,

Virginia

Screen Shot 2022-04-05 at 9.13.19 PM.png

Link to comment
  • Replies 6
  • Views 340
  • Created
  • Last Reply

Top Posters In This Topic

On 4/14/2022 at 9:33 AM, bathtubgems said:

please let me know if you can help out with this! thanks!

Sorry for delay. Just had some days off on my village

Add to Settings > Advanced > Code Injection > Footer

<style>
  .product-mark.sold-out {
    position: absolute;
    top: -70px !important;
    left: 0;
    background-color: pink;
    padding: 20px;
}
</style>

 

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

thanks for getting back to me! this doesn't seem to be working unfortunately. if possible i would like for my site to have the hover effect, as well as the sold out ribbon that looks exactly like the attached image (from this website)

here is the code I have added , and what it looks like on my site: http://bathtubgems.com. something isn't quire right

section.grid-meta-wrapper {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    transform: translate(-50%,-50%);
    z-index: 9999;
    opacity: 0;
}
section.grid-meta-wrapper * {
    text-align: center !important;
}
figure.grid-image:after {
    content: "";
    background-color: rgba(255,255,255,0.9);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999;
    opacity: 0;
}
.grid-item:hover section.grid-meta-wrapper {
    opacity: 1;
}
.grid-item:hover figure:after {
    opacity: 1;
}

<style>
  .product-mark.sold-out {
    position: absolute;
    top: -70px !important;
    left: 0;
    background-color: pink;
    padding: 20px;
}
</style>

Screen Shot 2022-04-18 at 6.54.23 PM.png

Link to comment
On 4/19/2022 at 9:06 AM, bathtubgems said:

thanks for getting back to me! this doesn't seem to be working unfortunately. if possible i would like for my site to have the hover effect, as well as the sold out ribbon that looks exactly like the attached image (from this website)

here is the code I have added , and what it looks like on my site: http://bathtubgems.com. something isn't quire right

section.grid-meta-wrapper {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    transform: translate(-50%,-50%);
    z-index: 9999;
    opacity: 0;
}
section.grid-meta-wrapper * {
    text-align: center !important;
}
figure.grid-image:after {
    content: "";
    background-color: rgba(255,255,255,0.9);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999;
    opacity: 0;
}
.grid-item:hover section.grid-meta-wrapper {
    opacity: 1;
}
.grid-item:hover figure:after {
    opacity: 1;
}

<style>
  .product-mark.sold-out {
    position: absolute;
    top: -70px !important;
    left: 0;
    background-color: pink;
    padding: 20px;
}
</style>

Screen Shot 2022-04-18 at 6.54.23 PM.png

The screenshot looks fine. Can you describe your desired layout?

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

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.