Responsive Mobile First Result Summary Component
Design comparison
Community feedback
- @HassiaiPosted over 1 year ago
Always avoid giving the body a height value, width, min-width or max-width value.
Always use em/rem and other responsive unit for the width, height, max-width, max-height, min-width, padding, margin and other values.
Scince you centered the main in the desktop design , there is no need to center it in the media query.
Well done for completing this challenge you, did an awesome Job. Congrats!!!
Marked as helpful2@InterestingPlusPosted over 1 year ago@Hassiai
I had started learning with
pixels.
Now, I will turn to
em
/rem
βThanks to Guide me π
0@InterestingPlusPosted over 1 year ago@Hassiai
I have commented in the code in the GitHub repository why I gave
height: 125vh
to the bodyWhat's your opinion about this problem.
0@HassiaiPosted over 1 year ago@InterestingPlus , it is no needed, i saw it
Marked as helpful1 - @lack21Posted over 1 year ago
Great job π, but I have some recommendation!
- Remove
height: 125vh
from thebody
, since you already havemin-height: 100vh
there's no need for first one.
Marked as helpful1@InterestingPlusPosted over 1 year ago@lack21
yes, but by giving
height: 100vh
the preview in solution is getting translated upwards. In this problem, I saw that the height of the body is not reaching100%
till the preview page, in other word not perfect match! so I have givenheight: 125vh.
What about your opinion.?, Give me other advice π.
0@lack21Posted over 1 year ago@InterestingPlus If you want
body
to take full height adjustmin-height: 100vh
and add{ display: grid; place-content: center; }
Instead of this
{ display: flex; flex-direction: column; align-items: center; justify-content: center; }
This should center the layout, if there's any problem let me know.
Marked as helpful1@InterestingPlusPosted over 1 year ago@lack21 uhh,
display: grid
also not working as well asheight: 125vh
. what you say? how can we solve this problem in other way?0@lack21Posted over 1 year ago@InterestingPlus Just remove
height: 125vh
from thebody
and addmin-height: 100vh
.If you want to make your code shorter, You can remove these from you're
body
{ display: flex; flex-direction: column; align-items: center; justify-content: center; }
And add these instead
{ display: grid; place-content: center; }
This should fix the layout!
Marked as helpful1 - Remove
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