Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found

Submitted

css flexbox and media queries

Om Dubeyβ€’ 50

@om205

Desktop design screenshot for the Product preview card component coding challenge

This is a solution for...

  • HTML
  • CSS
1newbie
View challenge

Design comparison


SolutionDesign

Solution retrospective


Why cannot other people see background image (using url) in my solution from github page link url?

Community feedback

Tammyβ€’ 100

@Tammy-Ajoko

Posted

Congratulations on completing the challenge. Everything seems to be ok only thing is that your image was not visible. When working with live servers you use the absolute path but the relative path, this should serve you much better .pic { background: url(./images/image-product-desktop.jpg); }

0
Shivaβ€’ 670

@shivaprakash-sudo

Posted

Hello Dubey,

GitHub looks for images using relative path, so we have to give relative path to the images instead of absolute paths. Instead of the path you've given, try ./images/your-image-name.png. Here . represents current folder (one dot means one step upwards into the folder structure), since the images are inside the images folder, you go into that to choose the image.

Few notes to consider:

  • Try doing the design for mobile screens first and then change the layouts for bigger screens using media queries.
  • Once we code for the mobile, we don't have to repeat the same code for bigger screens too, we just change what is needed to be changed after a certain breakpoint.
  • Try not use fixed widths for images or image containers, try using max-width: 100%; for images, so that they behave responsively.
  • Try to use rem or em instead of pixels, to make the site easier for responsiveness.

Happy coding

0
Lucas πŸ‘Ύβ€’ 104,580

@correlucas

Posted

πŸ‘ΎHello Om Dubey, congratulations for your new solution!

People doesn't see your image, because when you're working with local /live server, you don't need to indicate the exact folder, the computer recognize automatically the image location.

But when it goes to the repository you need to indicate before the image folder ./ dot slash if is a simple folder and ../ dot dot slash if is a subfolder, see the correct image import below

}
@media screen and (min-width: 670px)
.pic {
    background: url(./images/image-product-desktop.jpg);
}

πŸ‘‹ I hope this helps you and happy coding!

0

Please log in to post a comment

Log in with GitHub
Discord logo

Join 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