Design comparison
Solution retrospective
It is understanding the concept of CSS positioning. Next time I will use Bootstrap which I expect should be a cleaner code.
What challenges did you encounter, and how did you overcome them?How to center the QR component on the page and get it responsive. Used the W3School website and Udemy to learn.
What specific areas of your project would you like help with?How can I use fewer lines of CSS code to get a more responsive output?
Community feedback
- @ShoaibShujaPosted 5 months ago
Amazing job my friend but the component is not perfectly centered and here are some tips to make the code look better.
First of all, for the page styling create a CSS external file and link it to the page.
Second make the body take the whole page and center the elements inside the body by copying these lines of code to your file:
body { width: 100%; min-height: 100vh; display: flex; flex-direction: column; justify-content: center; align-items: center; }
Remove the
margin-top
from.container
and change thecontainer
width to take less space to match the challenge's main design I would recommend30%
or as you desire.Learn a bit more about CSS flexbox and grids.
Marked as helpful0
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