Design comparison
Community feedback
- @denieldenPosted about 2 years ago
Hi Ediomo, congratulations on completing the challenge, great job! π
Some little tips for optimizing your code:
- add
main
tag and wrap the card for improve the Accessibility - also you can use
article
tag instead of a simplediv
to the container card for improve the Accessibility img
element must have analt
attribute, it's very important!- remove all unnecessary code, the less you write the better as well as being clearer: for example the
div
container of image - remove all
margin and top
properties fromsection
tag and setwidth: 20rem
- use flexbox to the body to center the card. Read here -> best flex guide
- after, add
min-height: 100vh
to body because Flexbox aligns child items to the size of the parent container - instead of using
px or %
use relative units of measurement likerem
-> read here
Hope this help! Happy coding π
Marked as helpful0 - add
- @correlucasPosted about 2 years ago
πΎHi Goodnews Ediomo, Congratulations on completing your first challenge!π Welcome to the Frontend Mentor Community!
Hereβs some tips to improve your component design:
The box-shadow is a bit too strong, this is due the
opacity
andblur
. The secret to create a perfect and smooth shadow is to have low values foropacity
and increaseblur
try this value instead:box-shadow: 12px 7px 20px 6px rgb(57 75 84 / 8%);
If youβre not familiar to box-shadow you can use this site to create the shadow design and then just drop the code into the CSS: https://html-css-js.com/css/generator/box-shadow/
Your html code is not optimized yet, since its too long and have some unnecessary elements. To make it clean you start by removing some unnecessary
<div>
. For this solution you wrap everything inside a single block of content using<div>
or<main>
(better option for accessibility) and put inside the whole content<img>
/<h1>
and<p>
.<body> <main> <img src="./images/image-qr-code.png" alt="Qr Code Image" > <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> </body>
βοΈ I hope this helps you and happy coding!
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