New Shopify Certification now available: Liquid Storefronts for Theme Developers

Adapt background image to section

13 1 2

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.

Replies 3 (3)
Shopify Partner
455 73 68

you can add this property to the image :

background-size: cover;
Email :
Buy me a Coffee
Chat on WhatsApp
Shopify Partner
4222 977 1189

Hi @Luca93 

Try to add this one. 


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




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!

Please don't forget to 



Mark Solution 

to the post that helped you. Thanks!
Sip, savor, and support – your

Coffee Tip

 helps us keep coding magic.❤️❤️❤️
Need a knowledgeable developer? Come and visit us at

13 1 2

I tried, but it doesn't work