@AzpenMeadows
Posted
Hello,
I like your solution. Regarding changing image based on breakpoint, I would recommend using the html <picture></picture>
element. This allows to you set multiple image sources, and it will load the appropriate one based on screen declared width.
Regarding your background image not showing when hosted on GitHub pages, the url uses a file path starting at the root directory (i.e. / = root). GitHub seems to handle where root is differently (I am not entirely sure how this works). You can try using a path relative to your css file instead. A quick edit in dev tools got your site working fine for me. See below:
/* your path */
.image {
background-image: url("/images/image-product-desktop.jpg");
}
/* working path */
.image {
background-image: url("../images/image-product-desktop.jpg");
}
I hope this is helpful!
Marked as helpful