Design comparison
Solution retrospective
I had a bit of trouble when it came to the spacing of the elements within the card so that it looked exactly like the example, any way to make it easier when dealing with situations like this? I also struggle with using media queries and understanding when to use (min-width) vs. (max-width), did I use them correctly here? If not what could I improve when using media queries? Any tips for cleaner code is also appreciated. Thank you for checking out my code!
Community feedback
- @onna4Posted over 1 year ago
the one thing I learned is always design the smallest screen first and then the bigger (mobile first design) .. so you need to make the main design for mobile view and then use media queries for bigger screens by setting (min-width) .. you can use these breakpoints which are used by Bootstrap framework @media (min-width: 768px){ .container { width: 750px; } } @media (min-width: 992px){ .container { width: 970px; } } @media (min-width: 1200px){ .container { width: 1170px; } }
Marked as helpful0@jbilbrautPosted over 1 year ago@onna4 thanks for the feedback! i've been watching videos of other coders and i've noticed a lot of them start with mobile view too, so i think i'll take your advice and do that from now on. also, are the media queries you posted good to use as a template for all projects moving forward or just general examples of how to set them?
0@onna4Posted over 1 year ago@jbilbraut yes they can be used as a template for all projects.
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