Ekat27 Posted November 7, 2021 Share Posted November 7, 2021 Site URL: https://theretrocollectiveco.com So I followed this code (from a fellow forum user-thanks!) to add the darkened overlay to my product image when it is sold out. But if you look closely at my very left image, you can see in the top left corner that it says "Sold out" too, meaning it is written twice on the image. I just want the boldened text in the middle of the image for the customers to see. Do yall know how I'd adjust the code so that I didn't see the text in the upper left corner as well? I tried doing it myself but couldn't figure it out. I know this is really nit-picky, but any and all help is appreciated!! .post-type-store-item.sold-out .grid-image:before { content: 'Sold Out'; font-weight: bolder; color: #fff; font-size: 2em; width: 100%; height: 100%; position: absolute; z-index: 999; top: 50%; left: 50%; transform: translate(-50%, -50%); display: flex; align-content: center; justify-content: center; align-items: center; } .post-type-store-item.sold-out .grid-image:after { content: 'Sold Out'; width: 100%; height: 100%; position: absolute; top: 0; left: 0; background: #000; opacity: 0.2 } .post-type-store-item.sold-out .product-mark.sold-out { display: none; } Link to comment
Beyondspace Posted November 8, 2021 Share Posted November 8, 2021 9 hours ago, Ekat27 said: Site URL: https://theretrocollectiveco.com So I followed this code (from a fellow forum user-thanks!) to add the darkened overlay to my product image when it is sold out. But if you look closely at my very left image, you can see in the top left corner that it says "Sold out" too, meaning it is written twice on the image. I just want the boldened text in the middle of the image for the customers to see. Do yall know how I'd adjust the code so that I didn't see the text in the upper left corner as well? I tried doing it myself but couldn't figure it out. I know this is really nit-picky, but any and all help is appreciated!! .post-type-store-item.sold-out .grid-image:before { content: 'Sold Out'; font-weight: bolder; color: #fff; font-size: 2em; width: 100%; height: 100%; position: absolute; z-index: 999; top: 50%; left: 50%; transform: translate(-50%, -50%); display: flex; align-content: center; justify-content: center; align-items: center; } .post-type-store-item.sold-out .grid-image:after { content: 'Sold Out'; width: 100%; height: 100%; position: absolute; top: 0; left: 0; background: #000; opacity: 0.2 } .post-type-store-item.sold-out .product-mark.sold-out { display: none; } You can get rid of the sold out text in :after element Ekat27 1 BeyondSpace - Squarespace Website Developer 🖼️ Lightbox Studio (Enable Pinch/Zoom on lightbox) 🗓️ Delivery Date Picker (Squarespace Date format) 💫 Animated Buttons (Referral URL) 🥳 Sparkplugin Customisations Browsers (Browse +100 Spark plugin customisations) 🥳 Elfsight Template Browsers (Browse +1000 Elfsight widget Templates) If you find my answer useful, let's leave a like or upvote so others with the same issue can find their solution. Thank you! Link to comment
Ekat27 Posted November 9, 2021 Author Share Posted November 9, 2021 On 11/7/2021 at 10:48 PM, bangank36 said: You can get rid of the sold out text in :after element So I tried this.. when I deleted the first "Sold out" line it did this (pic below) and deleted all of the SOLD OUT text. Then I undid that and deleted just the second line of SOLD out, and it looks better, but undid the grey overlay on the image (pic below)..any suggestion on what to do from here? Your help is much appreciated! Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment