Frontend-Mentor-Product-preview-card-component
Design comparison
Solution retrospective
- what was difficult to do for me:
- centering all the content.
- I would like to know if there better workflow to did the solution.
Community feedback
- @correlucasPosted about 2 years ago
👾Hi Kira Weizman, congrats on completing this challenge!
Great solution and great start! By what I saw you’re on the right track. I’ve few suggestions to you that you can consider to add to your code:
You did a good work putting everything together in this challenge, something you can do to improve the image that needs to change between mobile and desktop is to use
<picture>
instead of<img>
wrapped in a div. You can manage both images inside the<picture>
tag and use the html to code to set when the images should change setting the devicemax-width
depending of the device (phone / computer) Here’s a guide about how to usepicture
:https://www.w3schools.com/tags/tag_picture.asp
I saw that for some properties you’ve used
rem
and for otherspx
. In this case it is better to use only one kind of unit to have a better organization for your code.relative units
asrem
orem
that have a better fit if you want your site more accessible between different screen sizes and devices.REM
andEM
does not just apply to font size, but to all sizes as well.✌️ I hope this helps you and happy coding!
Marked as helpful1 - @osmannurierdoganPosted about 2 years ago
Hello @kirawesh,
You did good job buddy :) In my opinion, there are some points that you should improve.
One them is proper usage of class names, you are accessing the elements with their tag name such as h1, p, div etc...
The other one is that you need to improve your responsive layout skills. When your code goes to mobile layout, it does not automatically align self to the center, and font-sizes for mobile layout is way bigger than it should be.
I hope my feedback will be helpful for you,. Also you can check my profile to see my solution or you just click this link (https://www.frontendmentor.io/solutions/product-preview-card-component-using-html-and-css-sass-X8Ysx64Wu0)
Take care, see you.
Marked as helpful1
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