Design comparison
Solution retrospective
Feedback is welcome, this is my first ever project.
Community feedback
- @correlucasPosted about 2 years ago
👾Hello @zkris-69, Congratulations on completing this challenge!
Your solution its almost done and I’ve some tips to help you to improve it:
1.Use the tag
<picture>
to wrap the product image inside the html instead of using it as<img>
orbackground-image
(with the css). Using<picture>
you wrap both images (desktop and mobile) and have more control over it, since you can set in the html when the images changes setting the screen size for each image.ote that for SEO / search engine reasons isn’t a better practice import this product image with CSS since this will make it harder to the image.Here’s the documentation and the guide to use this tag:
https://www.w3schools.com/tags/tag_picture.asp
2.Replace the
<h2>
containing the main title with<h1>
note that this title is the main heading for this page and every page needs one h1 to show which is the most important heading. Use the sequence h1 h2 h3 h4 h5 to show the hierarchy of your titles in the level of importance, never jump a level. ✌️ I hope this helps you and happy coding!Marked as helpful1@ly-mathPosted about 2 years ago@correlucas thank you for your advice. i'll keep it in mind <3
0 - @YavanhaPosted about 2 years ago
Hello,
Very nice job you did there.
I just quickcly went throught your code and here few things that I would do :
- avoid working as much as possible with fixed height, use min-height instead.
.container { display: grid; place-items: center; max-width: 50rem; height: 100vh; // min-height: 100vh margin: 1.9rem auto; padding: 0 1rem; }
- there is a nice trick for units, is to reset the font size of the html element to 62.5%. This way is easier for you to calculate in rem (10px = 1rem).
- for the image what you can do is setting max-width: 100% and the height to auto to correctly fit the container.
.img img { width: 100%; // max-width: 100% and height : auto; display: inherit; }
- always go for a mobile first approach it wil be easier for you to add complexity in the media queries for larger screen.
Hopefully, this is clear enought that you can understand and helps you a little
Marked as helpful1 - @rakshithjodukalluPosted about 2 years ago
The way you handled image and details looks nice. Great work keep going mate😃
0
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