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 - No framework - Only CSS

P

@tdimnet

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?

I'm trying to do the work as pixel perfect as possible :)

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

Some stuff with the resolution and spacing (espiacially between p tags).

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

I just want to be sure that the project displays well on different resolutions and screensizes.

Community feedback

P

@Islandstone89

Posted

HTML:

  • Use the <time> element for the date:<p>Published <time datetime="2023-12-21">21 Dec 2023</time></p>.

  • "HTML & CSS" is a heading, so change it to a <h2. As this is a blog card, it should also have a link inside.

CSS:

  • Add around 1rem of padding on the body, so the card doesn't touch the edges on small screens.

  • You don't need the auto margins on the card - it is centered horizontally using Flexbox.

  • Remove the card's width and the image's height.

  • Add a max-width of around 20rem on the card, to prevent it from getting too wide on larger screens.

  • font-size must never be in px. This is a big accessibility issue, as it prevents the font size from scaling with the user's default setting in the browser. Use rem instead.

  • line-height must also never be in px.

  • Media queries should be in rem.

Marked as helpful

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