Submitted over 2 years agoA solution to the Product preview card component challenge
Project made with HTML and CSS
@wellintontews

Solution retrospective
Project made with HTML and CSS, I'm looking for ideas to develop myself more and more in this magnificent world that is the front-end, all kinds of help and suggestions will be welcome
Code
Please log in to post a comment
Log in with GitHubCommunity feedback
- @ErayBarslan
Hey there, nice work on your solution! Some suggestions:
- You're using media-query on screens smaller than 375px for mobile version, although content overflows until 700px. For safer approach I suggest designing mobile version first then style for bigger screens by using
min-width
so you won't ever deal with overflowing issues. Also desktop layouts are usually more complex. By designing desktop first then switch mobile, we're taking that complexity away. So with mobile first approach, we'd be writing less code. - Unless you really need to, I'd suggest not giving
height
to your containers and always let it's children, padding, margin define it's height. Won't matter much for a static card but once you start working with dynamic content, you'd end up with lots of overflowing. - Lastly, instead of using fixed width on your containers you can use
max-width
to keep your containers responsive. Because by defaultwidth: auto
which is responsive and giving fix value overrides it. Hope these suggestions helps you, happy coding :)
- You're using media-query on screens smaller than 375px for mobile version, although content overflows until 700px. For safer approach I suggest designing mobile version first then style for bigger screens by using
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