I’m working on customizing my Shopify store, and I’m trying to add a wave background to my footer that is both fully responsive and spans the entire width of the screen, regardless of the device size.
Here’s what I’m struggling with:
The wave background isn’t stretching to cover the full width of the screen on some devices.
I want the background to remain proportional and look consistent across all screen sizes.
The wave should always align to the bottom of the footer, and its height should adjust dynamically to ensure it looks great on all devices
Here’s the CSS I’m currently using:
/* Sikrer fuld bredde og ingen marginer */
html, body {
margin: 0;
padding: 0;
width: 100%;
overflow-x: hidden; /* Forhindrer horisontal scrolling */
}
.site-footer {
position: relative;
width: 100vw; /* Garanterer, at footeren fylder hele skærmens bredde */
background: url('data:image/svg+xml,%3Csvg xmlns%3D%22http%3A//www.w3.org/2000/svg%22 viewBox%3D%220 0 1440 600%22%3E%3Cpath fill%3D%22%2326AAE3%22 fill-opacity%3D%221%22 d%3D%22M0%2C192L80%2C186.7C160%2C181%2C320%2C171%2C480%2C186.7C640%2C203%2C800%2C245%2C960%2C250.7C1120%2C256%2C1280%2C224%2C1360%2C208L1440%2C192L1440%2C600L1360%2C600C1280%2C600%2C1120%2C600%2C960%2C600C800%2C600%2C640%2C600%2C480%2C600C320%2C600%2C160%2C600%2C80%2C600L0%2C600Z%22%3E%3C/path%3E%3C/svg%3E');
background-size: cover; /* Sikrer, at baggrunden fylder hele bredden */
background-repeat: no-repeat;
background-position: bottom center; /* Sørger for, at bølgen er centreret */
height: 60vh; /* Giver dynamisk højde baseret på skærmen */
}
/* Responsiv justering */
@media (max-width: 768px) {
.site-footer {
height: 50vh; /* Reducerer højden for tablets */
}
}
@media (max-width: 480px) {
.site-footer {
height: 50vh; /* Reducerer højden yderligere for små skærme */
}
}
Did you change the image url? Or you delete the image on the file? If i click the image it should show the wave. Now its totally full white, upload the image again and add the url.
Please don’t forget to Like and Mark Solution to the post that helped you. Thanks!
The SVG is still intact
But instead of a wave being displayed, it’s just a blue box. Could it have something to do with the css code itself or what?
I have copied everything you sent and pasted into my theme.css.liquid