Sold out on sense 2.0 Theme

Topic summary

A user seeks to center a “SOLD OUT” badge on product images in collection pages using the Sense 2.0 theme, with reduced opacity on the product image itself.

Solution Provided:

  • Add CSS code to base.css or theme-specific stylesheet to position the badge:
.card__badge.top.right {
  position: absolute;
  top: 50%;
  right: 40%;
  bottom: 0;
}

Opacity Adjustment:

  • To add opacity to the badge background, modify the badge color in base.css using rgb(var(--color-badge-background), 0.5) where values below 1 increase transparency.
  • Screenshots demonstrate the code location and expected visual result.

Outstanding Issue:
The original poster clarified they want opacity applied to the product image (not the badge itself) when items are sold out. This request remains unresolved, with the user following up for additional guidance.

Summarized with AI on November 10. AI used: claude-sonnet-4-5-20250929.

Hi all, i’m trying to put SOLD OUT badge in the middle of an image (collection page) with low opacity of the image below.

How to?

Sense 2.0 v 12.00

www.danicoffeeshop.com

1 Like

HI @stefanensko

Do you mean like this?

Check this one.

From your Shopify admin dashboard, click on “Online Store” and then “Themes”.

Find the theme that you want to edit and click on “Actions” and then “Edit code”.

In the “Assets” folder, click on “base.css, style.css or theme.css” file, depending on which file your theme uses to store its CSS styles. At the bottom of the file, add the following CSS code:

.card__badge.top.right {
    position: absolute;
    top: 50%;
    right: 40%;
    bottom: 0;
}

And Save.

Please don’t forget to Like and Mark Solution to the post that helped you. Thanks!

1 Like

I also would like to remove opacity to the image under the sold out badge, how to?

1 Like

Ops, you can add this opacity by finding the the code in the base.css.

Just add the , 0.5

Made4uoRibe_1-1711731265415.png

like this or you can add another code in the base.css.

.badge {
  background-color: rgb(var(--color-badge-background), 0.5);
}

And Save.

Result:

Made4uoRibe_2-1711731335795.png

Note: You can adjust the opacity. 1 is the normal and below 1 is not.

Please don’t forget to Like and Mark Solution to the post that helped you. Thanks!

1 Like

Sorry for late reply..I want to remove opacity to the product not to the badge

Any news about this?