Design comparison
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.
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.
- 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
- A span tag in HTML is an inline element used to group elements within a document for styling purposes. It might be more efficient to use the <p> tag; the <p> element represents paragraph-level content, usually text:
<p>Scan the QR code to visit Frontend Mentor and take your coding skills to the next level</p>
CSS π¨:
- Use
min-height: 100vh
instead ofheight: 100vh
. Theheight
property will not work if the content of the page grows beyond the height of the viewport.
I hope you find it useful! π
Happy coding!
Marked as helpful0 - Use the
- @HassiaiPosted almost 2 years ago
Replace<div class="card-wrap">with the main tag, <div class="card-title"> <span> with <h1> , <div class="card-text"><span>with <p>and <div class="attribution"> with the footer tag to fix the accessibility issues. click here for more on web-accessibility and semantic html
There is no need to give .card-wrap a height value, replace that with a padding value for all the sides.
padding: 15px
, give the img a max-width of 100% Add a gap value of 1rem to .card-body for the space between the text, give p opacity of 0.5 for the faded color and h1 the same font-size as p, a font-size of 0.9357rem which is 15px.To center .card-wrap on the page using flexbox, replace the height in the body with min-height: 100vh. There is no need for a media query and there is no need to style .qr-container. you can give .card-wrap the width value in the media query, everything will work fine.
Hope am helpful.
Well done for completing this challenge. HAPPY CODING
Marked as helpful0 - @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
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