Design comparison
SolutionDesign
Solution retrospective
Any tips on handling the widths of the cards will be great
Community feedback
- @markup-mitchellPosted about 4 years ago
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.
1@AceKahunaPosted about 4 years ago@markup-mitchell Thanks a lot, I shall make the changes to the solution.
0 - change
- @markup-mitchellPosted about 4 years ago
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!
0@AceKahunaPosted about 4 years ago@markup-mitchell hello, my main concern is how can I approach the card's width without having to tweak the padding and margins.
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