Design comparison
SolutionDesign
Solution retrospective
The main issue I encountered is the image not displaying once uploaded to git hub pages. Change the url files and all works on my local browser but not on Github pages. Any tips or advice?
Community feedback
- @MelvinAguilarPosted almost 2 years ago
Hello there ๐. Good job on completing the challenge !
I have some suggestions about your code that might interest you.
- You already solved it, but out of curiosity whenthe path starts with a forward slash '/', it's an absolute path that refers to the root directory of the website. On the other hand, when the path starts with a dot and a forward slash ./ or a path without any forward slashes as in your solution, it's a relative path that refers to the current directory.
- The product image is not a decoration. You must not use the background-image property to add the product image. Instead, use the
<img>
tag to add the image. Use the background-image property only for decorative images that do not add any information to the page.
HTML ๐:
- Use the
<main>
tag to wrap all the main content of the page instead of the<div>
tag. With this semantic element you can improve the accessibility of your page.
- For specificity reasons you should work with classes instead of ids because they are more reusable. You can use ids to work with JavaScript, but you should use classes to style your elements. You can read more about this here ๐.
I hope you find it useful! ๐ Above all, the solution you submitted is great!
Happy coding!
Marked as helpful0
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