Design comparison
Solution retrospective
I have try different display layout for this like CSS Grid, CSS Flexbox. I will use Firefox for CSS debugging, it suits me.
What challenges did you encounter, and how did you overcome them?I initially faced a challenge centering a QR code without a container div or flexbox/grid. I realized that using flexbox would make this task much easier. This is a common challenge when working with HTML and CSS, and flexbox is a powerful tool for overcoming it.
What specific areas of your project would you like help with?I am happy with this method.
Community feedback
- @justinconnellPosted 8 months ago
Hi @viveknagesh21, Congratulations on submitting your QR Code solution! the design looks good.
I see you managed to centre the card nicely with FlexBox and having read your comment on how you got to that solution, I agree, FlexBox is great for achieving this goal.
I tried looking at the code repo but the link is broken so I used the browser to take a look at the code and have the following suggestion:
.container { display: flex; align-items: center; justify-content: center; height: 100vh; /* margin: auto; -- you don't need this if you set the width*/ width: 100vw; border-radius: 10px; }
An alternative solution is to use:
.container { height: 100vh; width: 100vw; border-radius: 10px; display: grid; place-content: center; }
I hope you find this feedback helpful!
Keep up the great work! J
Marked as helpful0@viveknagesh21Posted 8 months ago@justinconnell Thanks for the feedback, J. Good point about the margin! I will definitely explore CSS Grids thoroughly.
1 - @LuciaVerdePosted 8 months ago
Hello ! First of all... congratulations on submitting your QR code solution!
Although I am a beginner, I have two suggestions that may be helpful:
-
it's a good practice to use landmarks. You would probably like to wrap this card in a <main> landmark. Landmarks are structural elements that help assistive technologies and users navigate through a web page more efficiently by providing semantic meaning to different sections of the content.
-
It is better for font sizes to use rem instead of px. Rem provides flexibility, accessibility and consistency in web design.
I hope this is useful ! keep going !
0 -
Please log in to post a comment
Log in with GitHubJoin 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