Design comparison
Solution retrospective
This is my first solution so it may need some work any feedback would be helpful
Community feedback
- @pikapikamartPosted about 3 years ago
Hey, awesome job on this one. Layout in desktop looks great, but the responsive state could be improved and what like Hector said, the mobile layout breaks.
Some suggestions would be:
- You don't need to use
section
for each of the card examples, since those cards or component are all related to one another. If you were to usesection
, thesection
element will be wrapping all those cards, since it is a card collection "section". - Avoid using multiple
h1
on a webpage, always use at least 1h1
per page. For this one, theh1
would be a screen reader text. This might be new for you, when we say screen-reader text, this just means that the text will only be visible for screen-reader users but not for sighted users. Have a look at Grace's solution for this challenge, inspect the layout and see the usage ofh1
as well as the css stylings applied on it. Also take a look of how the layout is structured. - The
alt
for each cardimg
should be left empty likealt=""
since those are just decorative images. In animg
only acts as a decoration, usealt=""
on them, but if theimg
adds content, then use a meaningfulalt
value. - Those
learn more
should be using anchor tagsa
instead of justbutton
.
CSS
- On the
body
tag, avoid usingheight
property withvh
unit. This makes the element's height limited to the only remaining viewport/screen's height. Instead, replace it withmin-height: 100vh
, this takes full viewport and will expand if it needs to. - Same goes for the
main
element, avoid changing theheight
withvh
unit. - Lastly, if you did this css that I said, the mobile layout will work now just fine. As an addition, add
padding
to the left and right side of thebody
in mobile layout.
Just those above, still you did a great job on this one.
Marked as helpful0 - You don't need to use
- @encoreOaxPosted about 3 years ago
Hi Samuel! Your desktop solution looks awesome! You really nail it here. Unfortunately the mobile version breaks, I struggle the same way at the beginning. I suggest start with the mobile version first and then go to the desktop, it will help you to see miss matches. Keep it up with you great work!
Marked as helpful0
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