Skip to content
  • Learning paths
  • Challenges
  • Solutions
  • Articles
  • Unlock Pro
  • Log in with GitHub
Solution
Submitted over 2 years ago

Project made with HTML and CSS

Wellinton Tews•10
@wellintontews
A solution to the Product preview card component challenge
View live sitePreview (opens in new tab)View codeCode (opens in new tab)

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
Select a file

Please log in to post a comment

Log in with GitHub

Community feedback

  • Eray•1,410
    @ErayBarslan
    Posted over 2 years ago

    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 default width: auto which is responsive and giving fix value overrides it. Hope these suggestions helps you, happy coding :)

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
Frontend Mentor logo

Stay up to datewith new challenges, featured solutions, selected articles, and our latest news

Frontend Mentor

  • Unlock Pro
  • Contact us
  • FAQs
  • Become a partner

Explore

  • Learning paths
  • Challenges
  • Solutions
  • Articles

Community

  • Discord
  • Guidelines

For companies

  • Hire developers
  • Train developers
© Frontend Mentor 2019 - 2025
  • Terms
  • Cookie Policy
  • Privacy Policy
  • License

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub