Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found

Submitted

Testimonials grid section CSS

@Scott-Wilder

Desktop design screenshot for the Testimonials grid section coding challenge

This is a solution for...

  • HTML
  • CSS
2junior
View challenge

Design comparison


SolutionDesign

Solution retrospective


I felt using grid, width, and margin to get the desktop view was a bit hacky, please let me know if you found a better solution for the desktop layout, thanks!

Community feedback

Nakoya Wilson 1,530

@nakoyawilson

Posted

Instead of doing a 3 column grid and specifying widths, I would suggest doing a 4 column grid and using span 2 for the wider boxes. I experimented with your code and used this to achieve the layout.

.flex-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: auto auto;
    max-width: 70rem;
    gap: 10px;
    align-items: stretch;
  }

  .boxes {
    margin: 0;
  }

  .box-1 {
    grid-column: span 2;
  }

  .box-4 {
    grid-column: span 2;
  }

  .box-5 {
    grid-column: 4 / 5;
    grid-row: 1 / 3;
  }

Marked as helpful

2

@Scott-Wilder

Posted

@nakoyawilson thank you for the feedback

0

Please log in to post a comment

Log in with GitHub
Discord logo

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