Design comparison
Solution retrospective
I am unsure of how to organize my CSS. What are the best practices for CSS style?
Community feedback
- @MelvinAguilarPosted about 2 years ago
Hi @VMH1225 π, good job completing this challenge! π
I have some suggestions you might consider to improve your code:
- Use the
<main>
tag to wrap all the main content in your solution instead of using<div>
.
- To make alternative texts more worthwhile, add descriptive text to the alt attribute of the QR image to explain what the QR image does. Upon scanning the QR code, you will be redirected to the frontendmentor.io website, so an example of alternative text would be "QR code to frontendmentor.io". You can read more about alternative text here.
- Instead of using pixels in font size, use relative units of measure like
rem
orem
. The font size in absolute length units (px) does not allow users with limited vision to change the text size in some browsers. Reference.
- Setting a defined
height
for the card component is not recommended. The content should define the component height, otherwise, it will not be allowed to extend beyond your specifications. Alternatively, you can usemin-height
. In the same way, placing height on paragraphs and headings elements is not recommended.
- You could use a CSS Reset to remove browser built-in styles and reduce browser inconsistencies. Your body's default margin causes the vertical scrollbar to appear.
Popular reset style sheets:
Above all, the project is done wellπ. I hope those tips will help you! π
Good job, and happy coding! π
Marked as helpful1 - Use the
- @AdrianoEscarabotePosted about 2 years ago
Hi VMH1225, how are you?
I really liked the result of your project, but I have some tips that I think you will enjoy:
To inform the main content of your page we need to use a
main
tag, the fix this, wrap all the content with the main tag, like this:<main> <img src="assets/image-qr-code.png" alt="QR code"> <h1> Improve your front-end skills by building projects </h1> <p>Scan the QR code to visit Frontend Mentor and take your coding skills to the next level</p> </main>
The rest is great!
I hope it helps... π
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