How to adjust a background image to fit a section in the Dawn theme?

Good evening, can anyone tell me how to adapt a background image inserted into a section in the Shopify Dawn theme, in CSS? Because once inserted the image appears “enlarged” while I would like it to adapt to the proportions of the container itself.

I insert this code: > * { background: url(“Image URL”) !important; }

but then I no longer know how to adapt everything.
Thanks in advance.

1 Like

you can add this property to the image :

background-size: cover;

Hi @Luca93

Try to add this one.

background-size: cover; 
 background-repeat: no-repeat;

Or

background-size: contain;
  background-repeat: no-repeat;

And Save.

Please don’t forget to Like and Mark Solution to the post that helped you. Thanks!

I tried, but it doesn’t work