Ohhh how naive, I too thought this was the answer when I learnt it in css years ago. How wrong I was. One thing CSS is absolutely consistent in is, no matter how many ways we find to finally solve centering a div it *will* find a way of use case it doesn't work. Of I get time later I might dig up one of my multiple applications where it refused to center using your above solution because something stupid that required daft workarounds.
It isn’t the solution to every situation, as I stated in the video. It is the easiest solution that works most of the time. There is also CSS Grid and others.
The most important software engineering video of my life.
😂
Thank you Master, details like this truly do have a significant impact
You are very welcome.
Thank you very much for the simple explanation. I got dizzy so many times trying to achieve this thing that is so simple.
You are welcome.
Thank you so much, Mr. Corey! I really struggled with flex stuff. Your frontend lessons are priceless.
You are welcome.
Thank you very much Tim! Great series, keep on going 👏🏻
Thanks!
Great tutorial , understand height: inherit value more , ive seen it here and there , means the height/width will be inherited from its parent value.
Thanks!
Resolving a century old question "How to center a div?"😂😂😂
Yep.
Great tutorial, Thanks Tim!
You are welcome.
Ohhh how naive, I too thought this was the answer when I learnt it in css years ago.
How wrong I was.
One thing CSS is absolutely consistent in is, no matter how many ways we find to finally solve centering a div it *will* find a way of use case it doesn't work.
Of I get time later I might dig up one of my multiple applications where it refused to center using your above solution because something stupid that required daft workarounds.
It isn’t the solution to every situation, as I stated in the video. It is the easiest solution that works most of the time. There is also CSS Grid and others.