
Design comparison
SolutionDesign
Solution retrospective
Any tips on handling the widths of the cards will be great
Please log in to post a comment
Log in with GitHubCommunity feedback
- @markup-mitchell
Loads of ways.
- change
grid-column-template
properties if you're using grid - give it an explicit
width: 50px
- or make it
width: 50%
(of a parent with an explicit width) - or make it
width: 50vw
(50% of the width of the viewport) - put it in a flexbox an set it to
flex-grow: 1
to make it 100% as wide as its parent - control the size of the content and it will expand automatically (by default)
There's a thousand approaches, but it depends on the particular behaviour you're trying to achieve.
- change
- @markup-mitchell
Hi Eric,
Specifically what concern do you have about the card widths? I see you're controlling them as grid items, which seems fine... it's not obvious what you might be unhappy with.
Looks good!
Join 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