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 with Flexbox

@mathematiCode

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 proud of quickly I was able to do this challenge compared to my other ones. It helped to go back and do this (one of the easier ones) before continuing the harder challenges I had started like the FAQ accordion.

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

I couldn't figure out a great way to center the card on the verical axis. I ended up using margin-top: 5%; but I imagine there's another way to do this with flexbox. I tried this:

body {
display: flex;
flex-direction: column;
align-items: center;
height: 100vh;
} 

but the card was still sticking to the top for some reason.

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

I would love to know if there's a better way to have the card centered vertically than using margin-top.

I also would like feedback on accessibility ways to make my CSS more efficient. One thing I was wondering was what to write for alt text for the authors profile picture. Would people using screen readers like me to describe the person in the profile picture or would that just be a nuisance? Is there a way to provide more information, like a description of the author, where people using screen readers can access it if they choose to but it's not in the way?

Community feedback

P
Sruthi 20

@sruthiganjam

Posted

Add justify-content: center to the style. It aligns the blog card to the center

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