Skip to content
  • Unlock Pro
  • Log in with GitHub
Solution
Submitted over 1 year ago

Blog preview card

defPhisy•140
@defPhisy
A solution to the Blog preview card challenge
View live sitePreview (opens in new tab)View codeCode (opens in new tab)

Solution retrospective


What are you most proud of, and what would you do differently next time?

So much but in terms of this project i would choose my separate css-reset.css file that i can use for all my new projects.

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

Had a problem with a mysterious margin-bottom on my avatar img. After some inspection i found that this was a problem to the selectors i used.

Line 64-67 on style.css:

.blog-card img {
  border-radius: 12px;
  margin-bottom: 1.5rem;
}

Line 109-113:

.blog-card-author img {
  width: 35px;
  height: 35px;
  border-radius: 50%;
}

The problem was that.blog-card-author is inside .blog-card. So it took margin-bottom form there.

My solution to this was adding a new class for the avatar img, because i did not find a good solution to do it with selectors without loosing readability.

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

Everything what i can improve.

But for now i think you can help me with the avatar img, that does not load on the github page. locally everything works.

Due to the missing avatar image i found out that the alt text cannot be shown because the avatar is so small. Is that effecting screenreaders? I guess not but maybe there is a workaround.

Code
Loading...

Please log in to post a comment

Log in with GitHub

Community feedback

No feedback yet. Be the first to give feedback on defPhisy's solution.

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

Stay up to datewith new challenges, featured solutions, selected articles, and our latest news

Frontend Mentor

  • Unlock Pro
  • Contact us
  • FAQs
  • Become a partner
  • Use cases

Explore

  • Learning paths
  • Challenges
  • Solutions
  • Articles

Community

  • Discord
  • Guidelines

For companies

  • Hire developers
  • Train developers
© Frontend Mentor 2019 - 2025
  • Terms
  • Cookie Policy
  • Privacy Policy
  • License