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

Mobile First Responsive Four Card Feature Section Made With CSS Grid.

#accessibility#bem
Johnnyβ€’ 470

@johnnysedh3lllo

Desktop design screenshot for the Four card feature section coding challenge

This is a solution for...

  • HTML
  • CSS
1newbie
View challenge

Design comparison


SolutionDesign

Solution retrospective


Hey guys I think I'm getting a lot more familiar with CSS Grid. please let me know what you think of my solution and anyway I can write better code.

Community feedback

Lucas πŸ‘Ύβ€’ 104,580

@correlucas

Posted

πŸ‘ΎHello my friend Johnny, congratulations for your new solution!

Your solution is just great, you did a really good work with GRID. I did this challenge too and I was not patient so I've used FLEX to create this grid but my code was really more long that yours. Great work here.

The only thing you can improve here is give less padding to the body, because doing that you give less space for your cards grow when the screen scales down, a margins of 24px for the container is enought.

You don't really need to set the grid-rows-template here, see the code fixes below":

body {
    /* padding: 4em; */
}

@media (min-width: 768px)
article {
        /* grid-template-rows: 1fr 1fr 1fr 1fr; */
}

πŸ‘‹ I hope this helps you and happy coding!

Marked as helpful

1

Johnnyβ€’ 470

@johnnysedh3lllo

Posted

Thanks Lucas, i will implement the changes. i believe i don't need the grid-template-rows because the rows will form automatically because i specified the grid area on the elements. right?

0
Lucas πŸ‘Ύβ€’ 104,580

@correlucas

Posted

@johnnysedh3lllo If you use grid-area you need to specify, but if you use grid-template-column by default they repeat the rows as the columns, I'm saying that because I ever use columns and never set the rows unless you've a complex grid, in this case yes.

Marked as helpful

1
Johnnyβ€’ 470

@johnnysedh3lllo

Posted

alright man. thanks for the explaination. will take out the grid-template-rows

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