@Islandstone89
Posted
Hello, good job on this challenge!
Here are some suggestions for an even better solution - I hope they help :)
HTML:
- 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."
CSS:
-
Including a CSS Reset at the top is good practice.
-
Since Outfit is a sans-serif font ,change
font-family: "Outfit", serif;
tofont-family: "Outfit", sans-serif;
-
I recommend adding a bit of
padding
, for example16px
, on thebody
, to ensure the card doesn't touch the edges on small screens. -
I would move the styles on
.main
tobody
. -
Remove the margin on the card, as it is already centered using Flexbox.
-
Remove
width
andmin-width
on the card. Instead, give it amax-width
of20rem
, so it doesn't get too wide on larger screens. -
On the image, add
display: block
and changewidth
tomax-width: 100%
- the max-width prevents it from overflowing its container. Without this, an image would overflow if its intrinsic size is wider than the container.max-width: 100%
makes the image shrink to fit inside its container.
Marked as helpful
@calixmnt
Posted
thanks a lot for your suggestions they help me @Islandstone89