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

Blog Preview Card using Flex

Burnlees 80

@Burnlees

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?

Most proud of using sole flex, rather than grid like my previous challenge. As well as the time it took me to finish. Next time, I'd like to further improve my skills at accurately replicating sizing from the designs.

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

Struggled getting the card to align centered vertically using align-items, overcame this by doing some research and realising I needed to define a height of the parent container.

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

I'd like any general tips on how to improve this, if there is any more elegant solutions to what I've done.

Community feedback

@erratic-enigma

Posted

Hi, good work on this project! Here's some improvements I would suggest:

The .published-date should be a p element rather than a div, ideally with the date wrapped in a time element.

Give the body element a min-height of 100vh rather than a height. You should generally avoid using a fixed height on elements containing text, including the body.

The .card has a width set in pixels. This causes horizontal scrolling on smaller viewports. Use a max-width instead (ideally in rems) so the card shrinks in size on smaller viewports.

The .card being set to display: flex is redunant and can be removed.

Marked as helpful

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