Responsible QR Code with Media queries

Solution retrospective
Why my page is not 100% responsible ?
Please log in to post a comment
Log in with GitHubCommunity feedback
- @FluffyKas
Hello,
There's a few reasons for this:
-
The
body
has a width of 100% by default, there's no reason to overwrite this to 1440px. Theheight
should be swapped formin-height: 100vh
. -
To center a component you can use flexbox or grid. You could add this to the
body
:
display: grid; place-items: center;
-
Instead of giving your component a
width
, trymax-width
. % isn't great to use here (as that will just keep stretching with the screen size, which isn't what you want), try going with a rem value. -
You need to make your image responsive by using this snippet:
max-width: 100%; height: auto; display: block;
These things will probably help making your solution more responsive.
Marked as helpful -
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