Design comparison
Solution retrospective
Any feedback or suggestions are welcome
Community feedback
- @correlucasPosted about 2 years ago
👾Hello @birkaany, congratulations for your new solution!
🎯 Your solution its almost done and I’ve some tips to help you to improve it:
1.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. Look that for SEO and search engine reasons isn’t a better practice import this product image with CSS since this will make harder to the image be found. 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
2.Use a CSS RESET to remove all default settings for margins, making the images easier to work, see the article below where you can copy and paste this css code cheatsheet: https://piccalil.li/blog/a-modern-css-reset/
✌️ I hope this helps you and happy coding!
Marked as helpful0@birkaanyPosted about 2 years ago@correlucas I wasn't aware that picture tag exists. It is super handy, I definitely will rewrite the code to try this out.
Thank you so much for taking time to examine and give useful feedbacks. I loved coding in this community.
1 - @hyrongennikePosted about 2 years ago
Hi @birkaany,
Great job on completing the challenge mobile just needs a bit of work. You can add the following media query.
@media (max-width: 640px) { main.preview-card { flex-direction: column; } ain.preview-card .card-img { height: 250px; } .preview-card > div { flex-basis: auto; } .card-content { gap: 1.5rem; padding: 2rem; } }
This just stacks everything instead of have two columns on mobile. Hope this is helpful.
Let me know if you have any other questions.
Marked as helpful0@birkaanyPosted about 2 years ago@hyrongennike Excellent solution, thank you so much! I had a hard time deciding how to convert design into mobile, I wasn't sure if I did it right. Yet your code helped me a lot.
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