A user wants to make a header background image span the full browser width (rather than just the page content width) on Shopify’s Studio theme.
Initial Approach:
User added CSS targeting header.header element
Applied background image with background-size: 100% and no-repeat
Solution Provided:
Another user identified the issue: the CSS was targeting an inner element instead of its parent container.
Corrected approach:
Target sticky-header.header-wrapper instead of header.header
Use same background properties (URL, no-repeat, 100% size)
Apply within @media screen and (min-width: 990px) query
Additional Request:
The original poster also asked about adding a background image to the mega menu dropdown. A CSS snippet targeting .mega-menu__content with background-cover was suggested.
I found another discussion about this and added the CSS as instructed. The issue is, I want the header background image to be full width, rather than page width. Can anyone provide me with instruction on this?
This is how I added the background image:
Step 1: Went to Online Store->Theme->Edit code
Step 2: Then went to Asset->/base.css->paste below code at the bottom of the file: