Design comparison
Solution retrospective
Something wrong with media type. It doesn't work on 375px width screen. And also 100vh body vs height: 100% html and height: 100% body? Any other comments? Thanks!
Community feedback
- @dev-mksinghPosted 9 months ago
Hey @aseptimu, Why you feel like your code is not working on screen-size
375px
? Because i checked and its working fine as you wrote your code. From your second question i think you are confused between%
andvh
units. Right? See make one thing very clear that both arerelative-length units
, now the difference between them his:%
is basically for thepercentage for the container element
vh
is for theviewport of the screen
;
Viewport is the area your site appears on your browser or phone, whereas percentage is the width/height of the container element.
I guess you get my point. Hope this is helpful to you. All the best.
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