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

Flex box using flex-grid

#angular

@NelsonMungai2003

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 is the best way to center the container containing the QR code the heading and paragraph

Community feedback

Mark 250

@markskwid

Posted

Hello, @NelsonMungai2003

To center the element inside a flexbox you can use align-items and justify-content:

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

Happy Coding!

1

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