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

@jaojogadez

Desktop design screenshot for the Blog preview card coding challenge

This is a solution for...

  • HTML
  • CSS
1newbie
View challenge

Design comparison


SolutionDesign

Community feedback

P

@Islandstone89

Posted

HTML:

  • Always include an alt attribute on images.

  • Headings should always be in order, so you never start with a <h2>. "Learning" and "Published" are both <p>, not headings.

  • Remove <header>, that element is used for content that repeats across several pages, like a logo and a navigation bar.

  • Change the alt text on the profile image to "Headshot of Gary Hooper".

  • "Gary Hooper" is a <p>.

CSS:

  • Including a CSS Reset at the top is good practice.

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

  • Remove the margin on the card.

  • To center the card horizontally and vertically, use Flexbox on the body:

display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
min-height: 100svh;
  • Remove the picture selector, as you don't use that element.

  • Remove min-width on the card, and change max-width to 20rem.

  • Remove min-width on the top image, and change max-width to 100%.

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