How can I center the 'out of stock' label on product pages?

Topic summary

A user seeks help centering the “out of stock” badge on product pages.

Problem Identified:
The badge currently appears misaligned and needs to be centered within the product card.

Solutions Provided:

Two approaches were offered:

  1. Custom CSS via theme.liquid: Add code snippet above the </body> tag in the theme.liquid file
  2. Direct CSS modification: Insert CSS rule into base.css file:
    .card__content .card__badge {
      justify-content: center !important;
    }
    

Status: Solutions provided but not yet confirmed as implemented or tested by the original poster. The discussion remains open pending verification of the fix.

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

Hi @Marco211

Do you mean center this badge?

1 Like