Design comparison
Community feedback
- @Islandstone89Posted 2 months ago
Hey, congratulations on finishing this project - you did a great job!
A few tips to improve your solution even further:
HTML:
-
<main>
holds all of the main content on a page. As a card would likely not be the only component on a page, I would wrap the card content in a<div class="card">
inside of<main>
. -
The alt text must also say where it leads(the frontendmentor website). A good alt text would be "QR code leading to the Frontend Mentor website."
-
I would change the heading to a
<h2>
- a page should only have one<h1>
, reserved for the main heading. As this is a card heading, it would likely not be the main heading on a page with several components.
CSS:
-
I would recommend adding
1rem
ofpadding
on thebody
, to ensure the card doesn't touch the edges on small screens. -
320px
is a goodmax-width
for the card, however it should be in rem - change it to20rem
, which equals320px
. -
Remove
max-height
on the card. We never want to limit the height of elements containing text, as that can cause overflow if the content grows taller than the fixed height of its container. -
Do also remove the
height
in%
on the image. Instead, it's quite common to addheight: auto
for images on the CSS Reset.
Keep up the good work :)
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