Product preview card component using HTML|CSS|FLEXBOX
Design comparison
Community feedback
- @correlucasPosted over 2 years ago
👾Hola! Sebastian, congratulations for your solution!
The design elements are perfect you've only to do some work around the responsivity of your card in order to allow it to fit in more screen sizes.
Here's my tips:
1.Wrap the component and the attribution in the same div to git it a better alignment to the screen center.
2.Avoid to use
width
if you want your component gets responsive and contract when the window scale down, your container isn't resizing properly due all thewidth
properties you've set, all you need to do is switch all these properties tomax-width
.3.Use a single padding for all the content column, you don't need to set a padding for each h1, p, and button give a general padding to separate than from the column border and use
row-gap
to separate the elements vertically. This keep your code clean and better to modify with two properties.Hope it helps and happy coding bro!
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