How do I add a background image to the Dawn theme?

natart1999
New Member
3 0 0

I want to add the same background image to all pages in the dawn theme. How do I input that code?

0 Likes
PaulNewton
Shopify Partner
3123 194 575

https://css-tricks.com/almanac/properties/b/background-image/#images

with https://shopify.dev/api/liquid/filters/url-filters#asset_img_url 

body {
  background: url({{ 'logo.png' | asset_img_url: '300x' }});
}

 

There will be tweaking needing depending on the size of the image, need for responsiveness, whether it should be fixed, etc

 

https://css-tricks.com/perfect-full-page-background-image/ 

 

Merchants wanting this customization can contact me at paull.newton+shopifyforums@gmail.com with store url&pass, and use case details.

Problem Solved? ✔️Accept and ? Like the solution so you can help others.
Buy me a coffee ☕ paypal.me/paulnewton or donate to eff.org
Confused? Busy? Buy a custom solution paull.newton+shopifyforum@gmail.com
0 Likes
natart1999
New Member
3 0 0

Sorry I'm completely new to coding. Where would I put this code? Under Layouts or Assets? Or somewhere else? Which section? I tried putting it in theme.liquid but nothing would show up. 

0 Likes
PaulNewton
Shopify Partner
3123 194 575

It's CSS code put it in CSS files ,normally theme.css or custom.css

Always backup your theme before making changes.

Problem Solved? ✔️Accept and ? Like the solution so you can help others.
Buy me a coffee ☕ paypal.me/paulnewton or donate to eff.org
Confused? Busy? Buy a custom solution paull.newton+shopifyforum@gmail.com
0 Likes