Design comparison
Solution retrospective
Hello,
Feel free to comment on anyhting you find unnecessary in my code or if there was a more optimal way to do this. Also, i struggled with putting my container in the middle of the page without using margin.
Community feedback
- @codezolPosted over 1 year ago
very nice design, this shows your skill in using css, for centering the container the problem here comes form the body height , since the height is as default fitting the content if you used margin auto the centering will be just horizentally, so first do that body { height : 100vh; } then margin auto will center the contianer both horizentally and vertically , but for me i would rather use the grid like that. body { height: 100vh; display: grid: placecontent: center; } ok i hope that i was helpful keep the hardwork.
1 - @DezzaAnnePeregrinaPosted over 1 year ago
Congratulations on completing your QR Code Card. I suggest, try using rems instead of px for sizing your font-size, widths, etc. And also, try creating a :root to define your global CSS variables (which can be used throughout your stylesheets) for convenient adjustments. You can also create variables for your colors and font family.
For example:
:root { --primary-color: #FF0000; --font: Times New Roman; --font-size: 16px; } h1 { color: var(--primary-color); font-family: var(--font); font-size: 2rem; }
It's not a lot, but I hope it helps. Happy coding! 🙌🏻
1
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