Responsive QR Code Component

Solution retrospective
I am fairly new to html and css so I would love to know how my code looks.
When resizing the window to a really small window, the height of the box increases but the text stays limited to its designated area. Is the image the reason that the box is becoming so long when the window is smaller?
Any other feedback would also be welcome.
Please log in to post a comment
Log in with GitHubCommunity feedback
- @AndyAshley
Hey Zack! Good job on the challenge! I would suggest a few things for you. Using
vw
orvh
on text isn't a great idea. It does scale, but it gets so tiny that no one could read it. Also if you made your body or main container have adisplay: flex
withjustify-content: center
andalign-items: center
and removeposition: absolute
on theid="base"
container, it wouldn't squish like that and it would also remain centered to the page.for the html errors, the lang one can be fixed in nextJS by adding this to your next.config.js:
module.exports = { i18n: { locales: ["en"], defaultLocale: "en", }, };
then just make sure all your images have
alt
tags. :)you could also give the card container a
max-width
to prevent it from getting larger than intended. that way it can only get so big, but can scale smaller if needed.I hope that helps! feel free to ask me any questions if ya need to, Happy Coding!
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