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

Loopstudios landing page CSS grid and flexbox

shemjay 140

@shemjay

Desktop design screenshot for the Loopstudios landing page coding challenge

This is a solution for...

  • HTML
  • CSS
  • JS
2junior
View challenge

Design comparison


SolutionDesign

Solution retrospective


How can I improve on my grid for the image gallery?

Any other site improvement recommendations are much appreciated.

Community feedback

@T4R0TARO

Posted

Great job completing the desktop layout portion of the project! 👍 When you move on to the mobile layout, you can improve your grid to adjust to the size of the screen.

// your code 
.grid-display {
    display: grid;
    grid-template-columns: repeat(4, 250px);
    grid-template-rows: 1fr 1fr;
    grid-column-gap: 1em;
    grid-row-gap: 1em;
}

// REFACTOR
.grid-display {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    grid-gap: 1rem;
}
  • auto-fill: automatically fills the grid with grid-items
  • minmax: set the minimum and maximum size of the grid item
  • grid-gap: shorthand since your gaps are the same size

Continue the great work! Happy coding 😊

Marked as helpful

1

shemjay 140

@shemjay

Posted

@T4R0TARO Thank you so much! I had a hard time figuring that out

1

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