Design comparison
Solution retrospective
Hello, lovely people.
After deployment, the image doesn't appear ( both on phone and desktop ). I added !important
but it still doesn't. But it works fine on live server.
Can anybody check it out and help solve the problem please... Thanks
Community feedback
- @DavidMorgadePosted about 2 years ago
Hello JO, congrats on finishing the challenge! pretty good job, the only thing is that image problem that I will try to help you fix it!!
The problem with your
image
is that you are setting the wrong relative path to it, sometimes our code editor is a bit forgiveness and it shows up correct on production but not on deployment, try setting up the path correctly like this one:background-image: url(../images/image-hero-mobile.png)
instead ofbackground-image: url(/images/image-hero-mobile.png)
.With the new path, you are telling to your background image to search the image on a previous level folder with
../
(because you are in the CSS folder and need to go one level up to access the image folder), and then accesing the image folder!Also don't forget to add it in your media querie for mobile too !
Hope my feedback helps you, great work and I hope my answer gets the problems resolved, tell me how it goes!
1
Please log in to post a comment
Log in with GitHubJoin our Discord community
Join thousands of Frontend Mentor community members taking the challenges, sharing resources, helping each other, and chatting about all things front-end!
Join our Discord