Design comparison
Community feedback
- @julius-tamalePosted almost 2 years ago
Hello Mercy, Congs on submitting your solution.
-
You need to edit the font-family in your solution so that it aligns with the one in the challenge. You can do that by importing the font from google. For reference use: import google fonts in css
-
You also align .card to the center of the body by making the body a flex-container
body { display: flex; flex direction: column; /* to maintain layout since you have two divs in the body */ justify-content: center; height: 100vh; }
- Lastly, in the styleguide.md you're provided with the colors to use for backgrounds and color.
Happy coding
Marked as helpful0@MercysticksPosted almost 2 years ago@julius-tamale Thank you very much this was helpful
0 -
- @MelvinAguilarPosted almost 2 years ago
Hi there π. Good job on completing the challenge ! I have some feedback for you if you want to improve your code.
HTML:
- You can use either the CSS @import rule to import the font-family Reference
In your CSS file add this line of code:
@import url("https://fonts.googleapis.com/css2?family=Outfit:wght@500;700;900&display=swap");
And use it as follows:
.class-selector { font-family: "Outfit", sans-serif; }
- 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.
- You must use a level-one heading (h1) even though this is not a full-page challenge. You can create an '<h1>' element within your 'main' element that will be hidden visually but visible and readable by screen readers. The class "sr-only" hides content visually and here are the styles to copy. e.g.:
<h1 class="sr-only">QR Card Component</h1>
- Always avoid skipping heading levels; Always start from
<h1>
, followed by<h2>
, and so on up to <h6> (<h1>,<h2>,...,<h6>). Swap the<h3>
tag with<h2>
- 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
andpadding
to add vertical space between elements.
.card h3, .card h2 { font-weight: 700; padding: 1rem 2rem; }
- The
alt
attribute should explain the purpose of the image. Uppon scanning the QR code, the user will be redirected to the frontendmentor.io website, so a betteralt
attribute would beQR code to frontendmentor.io
If you want to learn more about the
alt
attribute, you can read this article.CSS:
- To center the component in the page, you should use Flexbox or Grid layout. You can read more about centering in CSS here. You can read more about centering in CSS here.
I hope you find it useful! π Above all, the solution you submitted is great!
Happy coding and Happy New Year! πππ
Marked as helpful0@MercysticksPosted almost 2 years ago@MelvinAguilar thank you very I WILL LOOK INTO THESE AND APPLY THEM
1
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