Design comparison
Solution retrospective
Hi everyone,
Maybe I'm a bit too much in perfectionism but hey, we're here to do our best to respect the original design. So I had a hard time to find a nice solution that really looks like the original design for the paragraph (if you really pay attention, you will see the difference).
In fact, I tried adding "margin-left/right", padding-left/right" or even adjusting the width... but nothing seems to work to look perfectly like the original π€β
Any help is welcome^^ Thanks!
Community feedback
- @MelvinAguilarPosted almost 2 years ago
Hello there π. Good job on completing the challenge !
I have some suggestions about your code that might interest you.
- Right now your solution looks very similar to the screenshot, however, the footer takes up some pixels of height that will make it so that your solution never looks exactly the same. I'm not saying to eliminate it, I'm just saying that it could get very complicated trying to make it exact. What the people recommend is not to focus on making it look similar, but on the quality of the code.
HTML π:
- Use the
<main>
tag to wrap all the main content of the page instead of the<div>
tag. With this semantic element you can improve the accessibility of your page.
- Use the
<footer>
tag to wrap the footer of the page instead of the<div class="attribution">
. The<footer>
element contains information about the author of the page, the copyright, and other legal information.
- The
<br>
tag is not a semantic element. If a screen reader user is reading the page, they will hear "line break", which breaks the flow of the content. Instead, use CSS properties likemargin
,padding
ormax-width
to add vertical space between elements.
- Since this component involves scanning the QR code, the image is not a decoration, so it must have an
alt
attribute. Thealt
attribute should explain its purpose. e.g.QR code to frontendmentor.io
CSS π¨:
- Instead of using pixels in font-size, use relative units like
em
orrem
. The font-size in absolute units like pixels does not scale with the user's browser settings. This can cause accessibility issues for users who have set their browser to use a larger font size. You can read more about this here π.
I hope you find it useful! π Above all, the solution you submitted is great!
Happy coding!
Marked as helpful1@keziarktsPosted almost 2 years ago@MelvinAguilar
Hello,
Thank you for your reply! Your suggestions are very helpful to me. I will try to apply them and focus more on providing quality code rather than focusing too much on the visual.
Your feedback encourages me to get better at coding! Thanks π
1 - @AhmedMahroussPosted almost 2 years ago
good jop my bro Congrats on completing your challenge!ππ»If you have any questions or need further clarification, feel free to reach out to me. Happy Coding! ππ
0@keziarktsPosted almost 2 years ago@amahrous176 thank you! I'm keeping in mind your offer of help π
0 - @floppitommiiiiiPosted almost 2 years ago
I also have the same question
0@keziarktsPosted almost 2 years ago@floppitommiiiii yeees I was so frustrated not to find a solution... but check the answer above ^^
So I think it's ok, we don't have to focus on the visual but on the quality of the code π
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