skip to Main Content

How to hide In stock Text only using CSS? Advance wishes..

<span class="option__title option__title testdhana">In stock | <span class="woocommerce-Price-amount amount"><span class="woocommerce-Price-currencySymbol">$</span>12.00</span> | CHICKEN BIRYANI</span>

2

Answers


  1. .d-none{
      display: none;
    }
    <span class="option__title option__title testdhana"><span class="d-none">In stock</span> | <span class="woocommerce-Price-amount amount"><span class="woocommerce-Price-currencySymbol">$</span>12.00</span> | CHICKEN BIRYANI</span>

    You can also hide | just wrap it also inside span if you needed.

    Login or Signup to reply.
  2. Use negative text-indent and hide the overflow

    .option__title {
      display:block;
      overflow:hidden;
      text-indent:-60px; /* adjust this */
    }
    <span class="option__title option__title testdhana">In stock | <span class="woocommerce-Price-amount amount"><span class="woocommerce-Price-currencySymbol">$</span>12.00</span> | CHICKEN BIRYANI</span>
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search