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 just flexbox

@ZeyadMohamed5

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 specific areas of your project would you like help with?

i had the same previous issue that the card in small mobile screen sizes didn't get any margins from left and right and while using the inspecting tool to highlight my elements it shows that the body is shrinking i tried to use max-width for my card element and it had the same problem.

Community feedback

@AkoToSiJeromeEh

Posted

Hey ! Great Work Out there i just notice that the avatar image is not horizontally aligned with the text , i want to suggest to use display : inline-block and vertical-align : middle in the .avatar-container img by adding this two css property you can achieve to align the image and text horizontally centered . that's all happy coding !

alternative to display : inline-block is you can also use the flex-box that i see you use on other element you just need flex-direction of row and align-items : center and add gap for spacing of image and text :)

.avatar-container img {
  max-width: 100%;
  display: inline-block; // add this
  vertical-align: middle; // add this
}
avatar-container {
  width: 28px;
  margin-right: 12px; you can remove this or just adjust 
}

Marked as helpful

1

@ZeyadMohamed5

Posted

@AkoToSiJeromeEh Thank you so much! i felt like something is wrong with my avatar icon but i just ignored it because i am already used my align-items: center; thanks

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