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

Plain CSS solution, help needed

erwin 60

@lanszesz

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 cannot imagine how to position those cards

Community feedback

@ziy-eg

Posted

in my perspective: 2 options:

  • the grid display option with 3 columns for the cards.
  • the flex display option with the default row direction. the second and the third card would have to be on the same <div> with (flex-direction: column;) for the flex.

OR you could use (align-self: center;) for the first and last cards.

Both 2 methods are the easiest for ME, and I prefer the Grid option as well.

Great job thou.. I love your code and I like the use of (.center) on your HTML.

Marked as helpful

1

erwin 60

@lanszesz

Posted

@ziy-eg Wow your second solution with the flex-direction: column; just blew my mind!

0
erwin 60

@lanszesz

Posted

@ziy-eg Finally I watched a grid video and fixed the cards !

1

@ziy-eg

Posted

@lanszesz that was awesome and easier, you see...

0
Riccardo 240

@riccardofano

Posted

Hello Erwin, you can position the cards using CSS grid!

On the desktop version you'll see there are 3 columns of equal size. Then there are what might appear to be 3 rows but in reality there are only 2, the cards on the side start at the first row but span 2, they are then centered. On the mobile version there's only one column so you can change the grid accordingly.

I hope this was helpful, take a look at my solution if you need any pointers.

Marked as helpful

1

erwin 60

@lanszesz

Posted

@riccardofano Hi! Thank you for your comment. I guess it's time to learn CSS grid because I literally know nothing about it. 😁 I will look at your solution

0
David 30

@davidfcopozo

Posted

Here is a pen I made with the layout you want to achieve and also a video with an excellent explanation of the Grid.

https://codepen.io/davidfcopozo/pen/LYdmRJR https://www.youtube.com/watch?v=duH4DLq5yoo&ab_channel=KevinPowell

...................................................................................................................................................................................................................................................................

1

@SurajHadage

Posted

You deed good and you can do it without even using flex.

  • All you have to do is use transform: translateY(50%) to first & second card, When screen size is above 1024px.
  • I have made this design without Flex & Grid. Check my solution.
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