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

Responsive page using simple CSS Properties

San Tran 10

@sqtran01

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


Hi,

This is my first ever html/css project. The things that I unsure are how to center a div container and how to make its size shrink or expand with the page size.

Thank you.

Community feedback

TripleA 270

@TRIPLE-ADE

Posted

Nice work For you to make you content to appear at the middle of your page Body{ Display: flex; Flex-direction:column; Justify-content:center; Align-items:center; Min-height:100vh; } Or Display:grid; Place-items: center;

Marked as helpful

0

San Tran 10

@sqtran01

Posted

@TRIPLE-ADE Thank you!

0
heba 320

@hebam17

Posted

For you to center the container and solve your accessibility issues wrap your HTML code "the container" with a <main> tag and add this CSS code main{ width:100vw; //taking full screen width height:100vh; //taking full screen height overflow-y:auto; display: flex; //display the main element as flex you can search for flexbox it's the most used method to center align elements justify-content:center; align-items:center }

and for it to shrink you can use something called a media query hope that helps

Marked as helpful

0

San Tran 10

@sqtran01

Posted

@hebam17 Thank you very much for your feedback! I'll try it out.

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