Design comparison
Solution retrospective
I like to keep things clean and simple, but please let me know if I'm missing something.
Community feedback
- @correlucasPosted about 2 years ago
๐พHi Monica, congratulations on your solution!๐ Welcome to the Frontend Mentor Coding Community!
Great solution and a great start! From what I saw youโre on the right track. Iโve few suggestions for you that you can consider adding to your code:
1.Clean your code by removing some unnecessary divs, most of the content can stand alone without a div. Use div only for blocks that need a special alignment or the content needs a special positioning.
2.For future projects, think about using relative units as
rem
orem
instead ofpx
to improve your performance by resizing fonts between different screens and devices.3.Use a CSS reset to avoid all the problems you can have with the default CSS setup, removing all margins, and making the images easier to work, see the article below where you can copy and paste this CSS code cheatsheet: https://piccalil.li/blog/a-modern-css-reset/
Here's my solution for this challenge if you wants to see how I build it: https://www.frontendmentor.io/solutions/qr-code-component-vanilla-cs-js-darklight-mode-nS2aOYYsJR
โ๏ธ I hope this helps you and happy coding!
Marked as helpful3 - @samantha-lindPosted about 2 years ago
Hello :)
I'm still new myself, so I don't have loads of valuable advice for you! But I noticed in your CSS file, there's an opportunity to simplify your code a little within the attribution class:
Instead of "padding: 40px 0 40px 0;"
You can just use "padding: 40px 0" - if there are only two values, it'll apply the first one to the top and bottom and the second one to the left and right. So if those sides are equal, you can keep your code shorter this way.
Hope that helps!
Marked as helpful2
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