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

Raneh 30

@Ranecodes

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

Community feedback

Vanza Setia 27,835

@vanzasetia

Posted

Hi there! 👋

I recommend using flexbox since the layout for the cards is not a two-dimensional layout. Flexbox is great for a one-dimensional layout.

I suggest wrapping the card elements with main landmark. After that, make the main element as the flex container for all the card elements.

For the body element, you can use the grid to center the layout.

Also, I would recommend writing the CSS with the mobile-first approach. It often leads to shorter and better performance code. Also, mobile users won't be required to process all of the desktop styles.

That's it! Hope this helps.

Marked as helpful

0

Raneh 30

@Ranecodes

Posted

@vanzasetia Thanks!

0
Vanza Setia 27,835

@vanzasetia

Posted

@Ranecodes No problem! 👍

0

@faruking

Posted

You can use flex instead of grid and use flex-wrap to make it responsive but you still have to use media-queries to remove the border-radius in mobile mode. Though grid and flex can be used interchangeably, flex is usually used for arranging items in a single direction(horizontal or vertical) while grid is usually used for arranging items in both directions. Here is a link to learn more about flex link and here is another link to learn about media queries link.

Marked as helpful

0

Raneh 30

@Ranecodes

Posted

@faruking Thank you!

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