Design comparison
Solution retrospective
Hey y'all ! ππ½
I finally got my hands dirty with some CSS Grid in this challenge. I do have a problem though, I got some side scrolling and I don't know what's causing it. If any of you amazing humans can help me out that'd be great π.
Community feedback
- @samsonshamPosted over 2 years ago
Hello Kally!π You did a great job on this challengeπ The responsive design is nice, especially the tablet view. I like it very much.π
For the scrolling, I found it caused by the
margin
in.container
that you are applying 5% on margin top and bottom. I am afraid if it would be too much for the total page height. As percentage is relative unit and it would be a bit hard to calculate and control if you put it to height. You may reset it to 0 then try some other ways.- A quick and dirty way is to add
overflow: hidden;
to body so no more scrolling (remember to undo it in mobile view otherwise you can't scroll in mobile). - If you only want some head space you might only add
padding-top
ormargin-top
to avoid unwanted bottom space. - If you want to make your container align centre vertically, you can set
display: flex; align-items:center;
inbody
.
Hope it would help! πͺ
1@al-lattePosted over 2 years ago@samsonsham Thank you! π. I'll give the solutions a try π
0 - A quick and dirty way is to add
- @Kamasah-DicksonPosted over 2 years ago
Your solution looks great on mobile besides I didn't experience any side scrolling on mobile. But if you do it maybe the cause of a width you applied on something. Good job, keep codingπ
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