Design comparison
Solution retrospective
Hi guys,
Thanks for taking the time to viewing my project.
I haven't touched any of the README files or text involving what is required for this project. I'm mainly after feedback for best practises. I really want to learn HTML and CSS, but as I am self taught I just wanted to make sure everything is solid before moving on to JavaScript.
I also just want to see if my code would be acceptable in a real world application.
Please feel free to be as critical as need be, every advice and tips means a lot to me.
Thanks so much for reading!
Community feedback
- @FluffyKasPosted over 2 years ago
Heyo,
Having some solid foundations before moving on to javascript is a great idea, it will save you from a lot of headache later. ^_^ Now some advice:
- It's best to center your component using grid/flexbox. Setting fixed margins won't work on every screen width, unfortunately. So you could add this to the
body
, for example:
display: grid; place-items: center; min-height: 100vh;
-
Remove the height from your component, there's no need for it, in fact it is causing a bit of an overflow at the moment! Most elements have some default height that can be increased by adding padding, if needed.
-
"qr-maintext" should be a heading and "qr-subtext" a paragraph, not the other way around ^_^
-
Remove the <br> from your solution, that's used for other things. You could set a max-width on your element or add some padding left and right if you'd like the text to break at a certain point.
I hope this helps a bit!
Marked as helpful1@EuphoriaCXIPosted over 2 years ago@FluffyKas Hey!
Thanks so much for your feedback, I appreciate it.
I updated a second project I just completed using your grid example which worked out great. When using margins, would it still be okay to use margin: 0 auto; when I want a certain max-width to be respected on the page?
I'll make improvements on my semantic HTML.
Thanks again!
1@FluffyKasPosted over 2 years ago@alwaysBeThankful Sure! Using margin: 0 auto and max-width is a good idea for centering most things. Centering elements with grid/flexbox like this will only work in specific use cases (meaning, you'll rarely have a single component dead centered in an empty page like in this challenge).
0 - It's best to center your component using grid/flexbox. Setting fixed margins won't work on every screen width, unfortunately. So you could add this to the
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