Submitted over 1 year ago
Responsive four card feature using flexbox and grid
@justEfere
Design comparison
SolutionDesign
Solution retrospective
Please do anyone know how to position element so when you increase the parent width size the individual cards width also increase. Please let me know, thank you.
Community feedback
- @snehamoybagPosted over 1 year ago
Hi @justEfere, 🙋♂️
Congratulations on completing this challenge! 🎉 You did a great job on the layout, it looks great! 👏
You can use percentage units to give relative size to the children 😄
<div class="container"> <div class="container-item"></div> </div>
.container { width: 100px; } .container-item { width: 50%; }
This will make the
.container-item
to be 50% of its parent. So if you change the width of.container
, the.container-item
's width will also change.Marked as helpful0
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