Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

351
Visualizações
How to style text product-template.liquid and put an oval around depending on text length Shopify

I am using the prestige theme and I want style my 'Restocked' like how you see it with 'Best Seller' that has the oval around it and a drop shadow if possible. Below is what I have in the product-template.liquid and I am trying to get the oval to autosize with the text and have a bit of padding to the sides and the top and bottom of the text, just like the picture of the 'best seller'. Any idea on how to do this?

<div class="Product__InfoWrapper">
<div class="Product__Info {% if image_count == 0 %}Product__Info--noGallery{% endif %}">
<div class="Container">

{% if product.tags contains "new-badge" %}
NEW PRODUCT
{% elsif product.tags contains 'restocked' %}
RESTOCKED 
{% elsif product.tags contains 'best-seller' %}
BEST SELLER 
{% elsif product.tags contains 'selling-fast' %}
SELLING FAST 
{% endif %}

{%- render 'product-meta', product: product, show_description: true -%}

{%- if product.template_suffix != 'coming-soon' -%}
{%- render 'product-form', product: product -%}
{%- endif -%}

What I have currently Current view

What I want What I am trying to get

about 4 years ago · Juan Pablo Isaza
2 Respostas
Responde à pergunta

0

enter image description here

Try this code. Use your font style and border color.

<body>
    <div style="text-align: center">
      <p
        style="
          border: 2px solid rgba(68, 66, 66, 0.473);
          border-radius: 300px;
          padding: 10px;
          width: 190px;
          font-size: 22px;
          font-weight: 900;
        "
      >
        RESTOCKED
      </p>
    </div>
</body>
about 4 years ago · Juan Pablo Isaza Relatório

0

This will solve your auto-resizing problem based on font size.

<!DOCTYPE html>
<html lang="en">
  <head>
    <title>Button style</title>
  </head>
  <body>
    <div style="text-align: center">
      <button
        style="
          border: 2px solid rgba(68, 66, 66, 0.473);
          border-radius: 300px;
          padding: 10px;
          padding-left: 20px;
          padding-right: 20px;
          font-size: 22px;
          font-weight: 900;
        "
      >
        RESTOCKED
      </button>
    </div>
  </body>
</html>

about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda