there are more aggressive css “resets” that set the default display type to flex. there’s no problem making anything a flexbox if it displays the way you want it to
Not sure what best practice is broadly, but in general display: flex is the first tool I reach for if I need to position child elements a little more carefully.
It’s good for most things more complex than just margin/padding/text-align. If it gets too complex for flexbox, dig into CSS grid.
https://www.w3schools.com/howto/howto_css_center_website.asp
How to make it centered vertically as well?
Check out Flexbox!
Is it a good idea to make body a flexbox? Is there any standards for doing this?
there are more aggressive css “resets” that set the default display type to flex. there’s no problem making anything a flexbox if it displays the way you want it to
Not sure what best practice is broadly, but in general
display: flexis the first tool I reach for if I need to position child elements a little more carefully.It’s good for most things more complex than just margin/padding/text-align. If it gets too complex for flexbox, dig into CSS grid.
I would suggest poking around on that page to find what you’re looking for. It has a decent search function.