3 ways to centre a div + life advice
A few years ago, when I was a beginner developer such a task, to centre a div, would be easy and hard at the same time. It's super comprehensible yet you're not sure how to do it (although you probably saw it many times while following a boot camp). ...
blog.daliborbelic.com1 min read
Stevan Slavnić
I have to add something to your post.
In the first example, CSS will center div inside viewport of the screen, others will just center div inside section. So with using flexbox and grid height of the element should be specified, in another way will not center div as you described it in "traditional way" if that was the point of the post, to describe how to escape using it.
Oldie but goldie! :D
Keep up. Like the posts!