Responsive QR code component using CSS Grid and media query
Design comparison
Solution retrospective
Kindly advise best practices/more efficient ways to align the surrounding container carrying the QR code image and the texts underneath as i found it a bit challenging.
I am unsure of the body background color i used. It took a while to find a color that was close to the prototype and I'm still not satisfied. Will welcome suggestions on tools to use to get accurate colours and hex color codes.
Thank you.
Community feedback
- @tomazi15Posted over 1 year ago
Hi @Taiwo-art
Sometimes i also find that some colours provided for the challenges do not really match the prototype.
When that happens i usually find the solution for the challenge i am working on and use chrome
colour picker
extension to get the correct colours.Marked as helpful1 - @FrostemanNeogardPosted over 1 year ago
I think this looks quite good visually, but there's quite a bit of improvements that could be made.
You seem to have a lot of divs where they aren't necessary. A simple way of structuring the card would be like this:
main img div h1 p
It is quite important for semantic HTML that you put the most important content inside a <main> element. Centrering this could look something like this:
// Card's parent, in this case the body element body { min-height: 100vh; display: flex; align-items: center; // Aligns vertically justify-content: center; // Aligns horizontally }
The <main> element's initial display attribute is block, which means the child elements will take up an entire row and display vertically. Now you can simply style the rest of the content accordingly.
As for the background color, I believe it can be found in the
style-guide.md
file, along with all the other colors and styling values used.Hope this helps!
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