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

Page blog interactive avec css et html

Lunarix09β€’ 90

@Lunarix09

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

Woldu Tsegazgiβ€’ 910

@weldu0

Posted

πŸ‘‹ Hey, @Lunarix09! You do not need to add Flexbox to every container that is inside another container. Use Flexbox only when you need to! The only Flexbox you need is for .avatar and body.

Don't use positioning for centering; Flexbox is much better for centering without making your code too complex. Here is how you can do it:

body {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
}

For the .card you don't need to set the height to anything value; it will take the space it needs automatically. For the tag .learning, you don't need to set the height either. Just add display: inline-block; and it will only take the space it needs without the risk of issues related to height.

See the difference here

I hope this helps you. 😊

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