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

Product display

@stepheigbe

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


For some reason the images are not showing and I have tried every reason I know. Please help me out.

Community feedback

Lakshmi 120

@Lakshmi-sath

Posted

Hi , What others said may be the case or you might have forgot to upload the image files into github...

Marked as helpful

0
Lucas 👾 104,580

@correlucas

Posted

👾Hello stepheigbe, congratulations for your new solution! Your image is not displaying due the fact you didnt wrote the correct path for the images, here's how you can fix it:

Here's the correct import for the image: <img id="perfume" src="./images/image-product-desktop.jpg" alt="perfume">

Remember, when the image is inside the repository folder use dot slash ./ and if is inside a subfolder use dot dot slash ../ If the image is the same folder of the html without folder just add normal path.

👋 I hope this helps you and happy coding!

Marked as helpful

0
Gabriel 370

@gabcchaves

Posted

Hi, stepheigbe. The reason the image is not displayed is because you did not specify its correct path, which is "images/image-product-desktop.jpg". Besides that, I would suggest that you used a div or article tag to be the card. Also, the body could have flex display, with both centered justify-content and align-items properties.

You may take a look at my code, though it has some flaws, which I got to fix soon. (I moved on to other projects): https://github.com/gabcchaves/product-preview-card-component-main

Marked as helpful

0

@stepheigbe

Posted

@gabcchaves I legit just realised it on my own when another project of mine worked but thank you soo much

0

@freakyjones

Posted

Hi stepheigbe

congrats on completing the challenge .

  1. If your current src for the Image is \media\product.jpg change it to ./media/product.jpg hopefully it will work.
  2. For the second Image change the src to ./media/iconcart.svg

Thanks, Happy coding :)

Marked as helpful

0

@gulamansari57181

Posted

Hey buddy. I have seen your query and you must have been so frustrated. hahahah !!!! here is a solution to your problem

Solution: in <img> tag you had written "src="\media\product.jpg" The issue is you have used backward slash "" . You should use forward slash "/" in your absolute path.

conclusion: <img id= "img" src="media/product.jpg"> see the magic.

Happy Coding !!! Do Upvote if you feel it helping.

Marked as helpful

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