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

Responsive Card using CSS Flexbox

Felipe 60

@typingfe

Desktop design screenshot for the Blog preview card 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?

Card using flexbox hope to learn how to use CSS grid

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

Doing the card using flexbox, so i searched some some references.

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

Use CSS grid

Community feedback

Yoshi 50

@ysstudio22

Posted

The flexbox looks great, but I especially liked your button element. I can see that being useful in real life so that readers can look for all the blog posts with the same label. You could make the margins slightly bigger or add some line height to card_____text to get your solution closer to the design.

1
Justin 120

@andrew-j-brown

Posted

Hi Felipe!

For a card like this, I think flexbox was the right call! It suits itself well to simple layouts such as the one in this project, and also allows for easy scaling.

The only difference I could find was a couple of elements styled differently than the reference images. The learning tag and author tag could use some bolding, and perhaps a bit more vertical spacing between the elements would be nice. Since we are using flexbox, you can use gap, similarly to how you used it in the card profile element to separate the photo and author name.

.card {
    ...  
    display: flex;
    flex-direction: column;
    gap: 16px;
    ...
}

This lets you easily space all of the elements equally, without having to add margins to each element!

Hope this helps, have a great day! :D

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