Here's the issue: the HTML5 page is responsive, but the background images are not changing with the screen size. The current code looks like this:
<div id="home-gallery" class="gallery-container fullscreen">
<section id="home-welcome" class="slide-1 gallery-slide background-cover" style="background-image:url(static/img/home/image1.jpg)">
.....
<section id="home-campaigns" class="slide-2 gallery-slide background-cover" style="background-image:url(static/img/home/image2.jpg)">
Currently, it is using one common image. I attempted a solution in CSS:
@media (min-width:800px) { background-image: url(bg-800.jpg) }
@media (min-width:1024px) { background-image: url(bg-1024.jpg) }
@media (min-width:1280px) { background-image: url(bg-1280.jpg) }
But I'm unsure how to link the style="background-image:
property to the CSS code. Should I write it like this:
<section id="home-campaigns" class="slide-2 gallery-slide background-cover" style="background-image">
And in the CSS:
#home-welcome background-image
@media (min-width:800px) { background-image: url(bg-1024.jpg) }
@media (min-width:1024px) { background-image: url(bg-1024.jpg) }
@media (min-width:1280px) { background-image: url(bg-1280.jpg) }
Any help would be greatly appreciated. I've tried troubleshooting but haven't had luck so far.