
Responsive Pricing Card using HTML + CSS flexbox
Design comparison
Solution retrospective
Any suggestions on how I can improve/organize my CSS declarations?
Any general improvement suggestions?
Thanks!
-NI
Community feedback
- @francescomerighi1202Posted almost 2 years ago
Hi there!
Your solution would be fine if it weren't for the fact that it isn't absolutely centered :(
I recommend using flexbox or grid to ensure that your card is centered.
Apply the following properties to the body:
If you use flexbox:
- 'min-height: 100vh'
- 'display: flex'
- 'justify-content: center'
- 'align-items: center'
If you use grid:
- 'min-height: 100vh'
- 'display:grid'
- 'place-content: center'
Hope I was helpful!
In any case don't hesitate to look at my solution if you need to ;)
Marked as helpful1
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