Mobile First Responsive Product Preview Card Component
Design comparison
Solution retrospective
I followed the mobile first approach to complete this project.
I used the min-height of 769px in the media-query to swith to the desktop design. Is this ok? or should the width be different. A list of general widths used for designing for different devices will be helpful.
I also had some trouble in the desktop design in making the image occupy 100% height of the container. Had to use a fixed min-width on the .product-card container to achieve this. Is this the right way to do this? Please let me know if there are any other ways.
Also, had to use a max-width of 50% on .text-half to make both the halves have equal width. Even if I used flex: 1; on both the halves, the .text-half was bigger in width for some reason. Any other way to get both halves to have equal width?
Thanks
Any other feedback is appreciated :)
Community feedback
- @mukwende2000Posted over 1 year ago
Give both the text and image flex-basis: 100% (which is the same as width: 100%) to make the two flex items equal.
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