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

Flexbox && Responsive Design

@ChrisAndrewsDev

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


Hey guys!

I decided to do another smaller project, as I've found they tend to have unexpected hidden difficulties (and because I'm procrastinating on starting the FYLO dark landing page 😅)

I would love some feedback on the way I've positioned the elements and the media-query styles, as I've got a sneaking suspicion that my code can be reduced quite a lot with a different approach to layouts from the start.

I'm open to all suggestions!

Thanks in advance 😁

Community feedback

Elaine 11,400

@elaineleung

Posted

Hey Chris, great work with this component, and I know exactly what you mean about working on smaller projects while in the middle of a bigger one. In fact this week instead of working on my challenge, I'm building a small reference component library on my CodePen where I try out different approaches of writing components like this one. I just made a 3-column one with flexbox where I use flex-wrap instead of changing flex directions in the media query, and it might address what you're asking in your question. Like you, I also fall into writing a lot of code when building out the component and it's only later when I revisit my code as reference that I see a lot of things I can cut out.

Here's my component with flexbox and one with grid that you can check out.

Marked as helpful

1

@ChrisAndrewsDev

Posted

@elaineleung Excellent, I'm checking that out now 😄

I also see you implemented the minmax() function which is something I've been trying to squeeze into my projects, but wasn't super sure how to implement it.

I am not super experienced with re-factoring my code at this point and most definitely need to skill up on that, it's good to have other pairs of eyes on your code!

Thanks for the feedback and resources, it's much appreciated!

0
Elaine 11,400

@elaineleung

Posted

@ChrisAndrewsDev Happy to share! I probably use clamp() and min() a lot more than minmax(), mostly because I don't usually use grid, but yeah it takes a lot of experimenting and hair pulling too at times 😅

1

@ChrisAndrewsDev

Posted

@elaineleung Awesome I will look into those as well, I'm still getting to grips with some of these functions and tricks 😵

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