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 using HTML and CSS

errbrokko 80

@errbrokko

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


What are you most proud of, and what would you do differently next time?

I'm proud that it works.

What challenges did you encounter, and how did you overcome them?

I struggled with positioning the cards but I somehow managed to find a way using flexbox. But I am not totally satisfied with the solution yet because I don't always like the way it responds when resizing the image.

What specific areas of your project would you like help with?

Ideas for positioning and responsive design.

Community feedback

@rowanrooster

Posted

I think for positioning at different sizes you kinda need to play around to get it just right.

For this challenge try using flex-direction: column; and justify-content: center; - this will force the 4 cards to split into 3 columns with the 4th card taking up space in the middle/second column. You can then move the cards in the first and third columns down, to get the final look. If that makes sense give it a try it should work without changing any other code.

I like the hover effect with the borders! if you dont want the box to change sizes on hover, you can add transparent left, right and bottom borders at the same thickness, for example:

.box {
  border: 2px solid transparent;
  border-top: 2px solid black;
}

.box:hover {
  border: 2px solid black;
}

Marked as helpful

1

errbrokko 80

@errbrokko

Posted

@rowanrooster Thank you for the advice. I still struggled a little with the positioning but I think I'm ok with it. The idea with the transparent border was perfect and exactly what I was looking for. I'll update my solution and then move on to the next project.

0

@rowanrooster

Posted

Awesome, yeah that looks cool! @errbrokko

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