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

Four card feature section (CSS Grid & CSS Variables)

Kyle-Law 10

@Kyle-Law

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


I'm a big fan of CSS Grid / Flexbox. If there's a way to achieve the designed Desktop view using them? The rationale is that it'd be a much smoother transition when converting from desktop to mobile view.

Community feedback

Anna Leigh 5,135

@brasspetals

Posted

To recreate the desktop design in Flexbox, I used 3 container divs for the cards: the first around “supervisor”, the second around both “team builder” and “karma”, and the third around “calculator”.

These three were inside an outer card container for the entire section to control flex-direction between layouts. On mobile, the outer card container is set to column. On desktop, it’s set to row. If you then set align-items: center to the outer card container, the cards should appear as they do in the desktop design - although you may have to add some margins or flex-gap to get the spacing right.

2

@juanmavelez

Posted

well in this case you can solve it with a pretty simple grid.

Just view each iteam as a 2x2 grid container. then your grid may have 4 row and 6 colums. you will have some like this.

empty empty teambuilder teambuilder empty empty supervisor supervisor teambuilder teambuilder calculator calculator supervisor supervisor karma karma calculator calculator empty empty karma karma emprty empty

hope it helps =P

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