
Responsive web design with flexbox and media queries
Design comparison
Community feedback
- P@Islandstone89Posted 5 months ago
Hey, well done finishing this first challenge!
Here are my suggestions for an even better solution :)
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."
-
Wrap the footer text in a
<p>
.
CSS:
-
Including a CSS Reset at the top is good practice.
-
box-sizing: border-box;
should be set on all elements using the universal selector:
*, *::before, *::after { box-sizing: border-box; }
Since it's now set on all elements, you should remove it anywhere else..
-
It's not common to set styles on
html
, so move those properties to thebody
. -
I recommend adding a bit of
padding
, for example16px
, on thebody
, to ensure the card doesn't touch the edges on small screens. -
On the
body
, changeheight
tomin-height: 100svh
- this way, the content will not get cut off if it grows beneath the viewport. Removeheight: 100%
. Addgap: 2rem
, this creates breathing room between the<main>
and the<footer>
. -
font-size
on.attribution
must also be inrem
. Here is why you must never usepx
forfont-size
. -
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. -
On the image, add
height: auto
,display: block
andmax-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.
0P@cookie-monster01Posted 5 months ago@Islandstone89 Thank you for detailed feedback. I had done this project a few days ago, and I'm practicing both newbie and junior projects, hence i submitted my old project in my learning path, so i could access the next newbie project.
But could i request a feedback on the latest project I did. Here's the link for the same: https://www.frontendmentor.io/solutions/fylo-two-column-layout-using-grid-and-flexbox-V_8Opg3pg4
I could also use your help in understanding:
-
how to add custom message alert on email input (Please note I haven't yet learnt about sass variables.
-
how to change the fill color of svg icons on hover.
Thank you! :)
1P@Islandstone89Posted 5 months ago@cookie-monster01 Sure, I'll take a look at it tomorrow :)
0P@cookie-monster01Posted 5 months ago@Islandstone89 That would be super helpful :)
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