@correlucas
Posted
👾Hi @Anne301, congratulations on your solution!👋 Welcome to the Frontend Mentor Coding Community!
Great solution and a great start! From what I saw you’re on the right track. I’ve few suggestions for you that you can consider adding to your code:
1.When you download the project files there’s a file called style-guide.md
where you can find information such as hsl color codes
and the font-size
for the headings. The background-color in this case is background-color: #D5E1EF
2.Fix the alignment of the whole content using flex
and min-height
to manage the vertical alignment and make everything centered.First of all put min-height: 100vh
to the body
to make the body display 100% of the viewport height (this makes the container align to the height size that's now 100% of the screen height) size and display: flex
e flex-direction: column
to align the child element (the container) vertically using the body as reference.
3.Clean your code by removing some unnecessary divs, most of the content can stand alone without a div. Use div only for blocks that need a special alignment or the content needs a special positioning.
4.Add a margin of around margin: 20px
to avoid the card touching the screen edges while it scales down.
5.Use relative units as rem
or em
instead of px
to improve your performance by resizing fonts between different screens and devices. These units are better to make your website more accessible. REM does not just apply to font size, but to all sizes as well.
body {
min-height: 100vh;
font-family: 'Outfit', sans-serif;
background-color: var(--Grayish-blue);
display: flex;
align-items: center;
justify-content: center;
flex-direction: column;
}
Here's my solution for this challenge if you wants to see how I build it: https://www.frontendmentor.io/solutions/qr-code-component-vanilla-cs-js-darklight-mode-nS2aOYYsJR
✌️ I hope this helps you and happy coding!