Design comparison
Community feedback
- @Islandstone89Posted 6 months ago
Good job!
Here are some suggestions:
HTML:
-
The alt text must also say where it leads(frontendmentor website). Don't include words like "image" or "photo", as screen readers automatically announce it as an image. A good alt text would be "QR code leading to the Frontend Mentor website."
-
Use
<p>
for the footer text.
CSS:
-
You don't need to set
font-size
onhtml
, as100%
is the default value. -
I like to add
1rem
ofpadding
on thebody
, to ensure the card doesn't touch the edges on small screens. -
Remove
max-width
onbody
. -
I would move the properties on
main
tobody
, and addflex-direction: column
andgap: 2rem
. -
Remove all widths and heights in
px
. We rarely want to set fixed sizes - the content should be able to adapt to all screen sizes. -
Add a
max-width
of around20rem
on the card, to prevent it from getting too wide on larger screens. -
Since all of the text should be centered, you only need to set
text-align: center
on the body, and remove it elsewhere. The children will inherit the value. -
As the design doesn't change, there is no need for any media queries. When you do need them, they should be in rem, not px.
Marked as helpful0@alchrdevPosted 6 months ago@Islandstone89 Hello! I greatly appreciate your valuable comments. They have been of great help for my growth and continuous improvement. I have incorporated all your suggestions into a new commit and I am very satisfied with the changes. I am always open to learning and improving, so if you have more observations on this or some of my other challenges, I will be delighted to read them. Thank you again for your time and help
1@Islandstone89Posted 6 months ago@alchrdev Happy to help :) You did great!
You can remove
min-height: 100vh
, as you already havemin-height: 100svh
.You can also remove the
font-size
on.card-desc
- it is a<p>
, meaning1rem
is its default value.Finally, you don't need to declare
height: auto
on the image.Keep up the excellent work :)
Marked as helpful0@alchrdevPosted 6 months ago@Islandstone89 You’re great too! I will continue to work hard to improve every day more. :)
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