QR code component that I designed using HTML, CSS and Media Query
Design comparison
Solution retrospective
Please, feedbacks are highly welcome
Community feedback
- @MohamedAridahPosted over 2 years ago
Hello @HenryAgu, I have some notes for you:
- the
width
of the card is quite small try to increase it.
.content{ max-width: 310px; /* will be better */ padding : 18px; /* instead of setting padding-right and padding-left for every element this is shorter and easy to edit from one place */ }
- Set
font-family
Globally instead of declare it for each element like in.write-up h3
and..write-up p
.
body { font-family:"Outfit", sans-serif; }
.content img
you gave it a fixedheight
and this is not best practice because this could corrupt the image resolution. Instead you can usemax-width: 100%
this means it will take the full width of the its wrapper. In this casepadding
andmargin
can be removed
.content img{ max-width: 100%; border-radius: 15px; }
-
.content img
you usedalign-self
and this property will be Useless because you didn't usedisplay: flex
for the image. -
let
.write-up
take the full width of the card andpadding
we set previously for.content
will make the space design required. In this casepadding-left
you set can be removed. -
remove negative
margin
for.write-up h3
andpadding
also because it makes a big space in the bottom -
try to increase the
font-size
for both.write-up h3
and.write-up p
** For fixing Accessibility issues:** - use
main
element as wrapper for the.content
element. - use<h1>
heading level instead<h3>
heading level in the.write-up
- you can see My solution for this challenge it may be useful for you.!
I hope this wasn't too long for you, hoping also it was useful😍.
Goodbye and have a nice day.
Keep coding🚀
0 - the
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