Image Size CSS not working although it should

68 views Asked by At

I am trying to adjust the image height size of the hidden cart.

I have inspected the website with Developer Tools of Firefox and Brave. It appears like this modification should do the trick:

.woocommerce-js ul.product_list_widget li img {
  position: absolute;
  left: 0;
  width: 4em;
 height: auto !important; (was before 4em)
 margin: 0 0 .5em 0;
 top: 50%;
 transform: translateY(-50%);
 object-fit: contain;

}

It was not working so I have put !important, without any effect.

Any idea to help will be welcome!

Website can be tested :enter image description here(www.chic-and-chic.com)

Marianne

1

There are 1 answers

0
Marianne On

I have managed to make it work! For some reason, I had to put CSS directly in the Astra Theme Child style.css. It was not working through the built-in CSS editor. If it could help someone else.