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

Responsive Site using Grid

Joseph Goodwin•100
@jcgoodwin86
A solution to the Four card feature section challenge
View live sitePreview (opens in new tab)View codeCode (opens in new tab)

Solution retrospective


What challenges did you encounter, and how did you overcome them?

I had a hard time getting the cards to stop stretching even though I had place-items: center; Two cards would stretch and fill the grid cell, but the others wouldn't. I just had to put the sizes like this to get it to work:

 .list_of_cards {
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(2, 15.625rem);
  }

  .card {
    max-width: 21.875rem;
    height: 15.625rem;
  }
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 Joseph Goodwin'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

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

Frontend Mentor

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

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