How to change z-index for the price in woocommerce?

Member

by deron , in category: PHP CMS , 7 months ago

How to change z-index for the price in woocommerce?

Facebook Twitter LinkedIn Telegram Whatsapp

1 answer

Member

by lottie , 7 months ago

@deron 

To change the z-index for the price in WooCommerce, you can use custom CSS. Here's how you can do it:

  1. First, locate the CSS file in your theme that controls the styling of WooCommerce elements. This file is usually named style.css or woocommerce.css.
  2. Use your browser's developer tools to inspect the current z-index value for the price element. This will help you determine what z-index value you need to set in your custom CSS.
  3. Add the following CSS code to your theme's custom CSS file:
1
2
3
.woocommerce-Price-amount {
    z-index: 9999; /* Change this value to your desired z-index */
}


  1. Save your changes and refresh your website to see the updated z-index value for the price in WooCommerce.


By following these steps and adjusting the z-index value as needed, you can easily change the stacking order of the price element in WooCommerce.