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

for flex the div to centered

LAVARAJU GORLIโ€ข 10

@imlavaraju

Desktop design screenshot for the QR code component 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 actually some confusion ,but after this i gained some confidence ,this is just center the div,by using display flex.

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

nothing to chanllenge any friim this challenge

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

yes,to center the element from any project

Community feedback

P
Koda๐Ÿ‘นโ€ข 3,810

@kodan96

Posted

hi there! ๐Ÿ‘‹

instead of creating a container element and applying height: 100vh; to it you can center your content with Flexbox if you apply these to the body tag:

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

Hope this was helpful ๐Ÿ™

Good luck and happy coding! ๐Ÿ™Œ

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