Design comparison
Solution retrospective
when i reduce the screen size it doesn't stay centered
Community feedback
- @ratul0407Posted 11 months ago
@Ovicky congrats on completing this challenge🎉🎉
You've done a really great job👍. And on to your question, It doesn't stays centered because you've set
width
andheight
on you.first-grid
remove it and it solves the problem a little bit. A little bit cause you also need to change your code morebody { min-height: 100vh; display: grid; place-content: center; }
Remove everything from your
.first-grid
they are of no use to you. And also remove all the properties from.grid-all
as well except thewidth
and I'd recommend you to usemax-width
instead ofwidth
..first-grid { border-radius: 1rem; padding: 0.5rem; background-color: white;
And now your solution is a little bit better.
I hope you found this helpful👍👍
Have a very nice day and happy coding my friend😄
0
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