When I add tr { display: inline-grid; }
it causes issues in cart page and other pages. How to apply it only in product page?
I need to put the variations under the attribute name. Please see the following screenshots:
I also need to reduce the space between variations if the product has 2 variations:
tr { display: inline-grid; }
To target single product pages, use the body class: single-product
.
To target the attribute dropdowns table for variable products, use: table.variations
All together:
.single-product table.variations tr { display: inline-grid; }
It should work as desired.