Skip to content
  • Unlock Pro
  • Log in with GitHub
Solution
Submitted over 1 year ago

Product Preview Card

Kate Dames•250
@funficient
A solution to the Product preview card component challenge
View live sitePreview (opens in new tab)View codeCode (opens in new tab)

Solution retrospective


This should be a very easy challenge, and yet I'm still struggling to get the mobile image displayed correctly! Please help!

I know it is to do with the height, but I tried everything I could think of and still can't get it right. How do I modify the height on mobile view to show the image correctly?

.card-container {
    display: grid;
    place-content: center;
    grid-template-columns: 1fr 1fr;
    max-width: 50rem;
    height: minmax(auto, 40rem); 
    overflow: hidden;
    border-radius:20px;
}

Thank you!

Code
Loading...

Please log in to post a comment

Log in with GitHub

Community feedback

No feedback yet. Be the first to give feedback on Kate Dames's solution.

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