Design comparison
Solution retrospective
Alignment and spacing inside each card were most difficult to figure out. Is there a better way to do it? Also seems to me like I overcomplicated everything.
Community feedback
- @prantiknoorPosted over 2 years ago
Sanja, Your solution is good and straightforward. Only, you overcomplicated to round the cards. You can easily round the border by only putting the
border-radius
on the.grid
class & addingoverflow: hidden;
. As your code will be more simple..grid { display: grid; grid-template-columns: repeat(3, 300px); grid-auto-rows: 500px; border-radius: 10px; overflow: hidden; }
Marked as helpful1@sdrenjanPosted over 2 years ago@prantiknoor ok I tried it on .grid and it would't round corners at all. Then I tried it of .flex itself (inside .grid) and it rounded left and right card correct, but middle card got all 4 corners rounded. Do you know why this is happening?
0@prantiknoorPosted over 2 years ago@sdrenjan Sorry for the late, Sanja.
To solve this issue, you only need to remove the padding from
.grid
;1@sdrenjanPosted over 2 years ago@prantiknoor Thank you! I don't even remember why I put it there XD
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