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

3 Column Preview card component with CSS Grid

Jeanette 60

@JeanetteW

Desktop design screenshot for the 3-column preview card component coding challenge

This is a solution for...

  • HTML
  • CSS
1newbie
View challenge

Design comparison


SolutionDesign

Solution retrospective


Would you use CSS Grid or Flexbox for this challenge?

Community feedback

Jenna 125

@jamby4546

Posted

I think the general practice is that if you are only arranging boxes in the x direction, to use flexbox. If you have a layout that needs boxes arranged in the x AND y directions, use CSS grids.

But honestly I prefer CSS grids every time even for a single line of boxes because I feel like it is easier to change if the design changes later on and it is more flexible. I am still a beginner though, its just what is easier for me to think about! It probably comes down to preference but I am not sure

0

Jeanette 60

@JeanetteW

Posted

@jamby4546 Hi Jamby, thanks for the reply. Your explanation of when to use flexbox and when to use grids does make sense.

I also prefer grid. Just feels like placing elements is easier.

0
Rayane 1,935

@RayaneBengaoui

Posted

Hello Jeanette,

Congrats for completing the challenge ! 🙂

Here Flexbox is pretty convenient as it's pretty straightforward with the property flex : direction to switch from a line or a column. For linear designs Flexbox works pretty well.

I'd like to suggest :

  • Adding min-height : 100vh to your body to make sure it covers the entire viewport.

  • Making your body a flex container with properties display: flex, justify-content: center, align-items: center and flex-direction: center to center your .container class on the page.

If you want to implement it with Flexbox you can check my version of the challenge where I've used it. I think it's simpler than Grid here.

Overall, well done for the challenge and happy coding ! 😃

0

Jeanette 60

@JeanetteW

Posted

@RayaneBengaoui Thank you so much for your response. It seems I still miss the little details which makes a huge impact on a final design. I will definately make notes of your suggestions.

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