Design comparison
Solution retrospective
I wonder that, when I write css, should I use width or max-width for card's width and why? Thank you all!
Community feedback
- @MiculinoPosted almost 3 years ago
Well done on completing this challenge, Chris!
First of all, I have to say that I like how you've structured your HTML and CSS code. It's clean and easy to read through. Moreover, your use of the HTML semantics was on point.
Your website is also responsive and you've used relative units, which is nice to see.
Regarding your inquiry, one example when you'd use max-width is if you're building a mobile first design and you want an element to stick to a set width after a given resolution breakpoint has been reached. For example, if you set max-width: 500px on a div, then that width will scale until 500px and no more.
All in all, you've done a great job both in your HTML and CSS. You might want to start looking into BEM methodology and SCSS / SASS.
Marked as helpful0@chrisvn188Posted almost 3 years ago@Remus432 Thank you so much for the respond! I will start learn BEM this week.
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