okay, so back in the dark ages, in html3 there wasn’t true horizontal centering. there was a <center> tag that would horizontally center content you enclose in that, but it would not really work for vertical centering, and I’m fairly certain that’s the one you care about. That’s truly goofy. Then html4 came and tables came and that’s when css1 and css2 came out. I believe that was early to mid 90s. With tables, came the table hack where you used valign. Funny thing, this shit is still valid and works and it is used daily. If you receive any newsletters, and they have fancy images, background color, buttons - that is built on the table hack.
Then, the silly hacks got introduced. Backbone.js, underscore.js - these were a must just so a page can work with all the crap people were doing. That’s why… instead of fixing underlying problems of web development, more hacks got introduced. The worst one was the transform hack. You absolutely positioned the element and then used transform to 50% so that made sure that, on a fixed height container, it’ll be centered. You obviously had to plan for the content height itself, etc - hence why it’s the worst one. I hated that one.
I believe the immense pain of doing the transform hack was the reason why finally flex and flexbox were introduced. I have not looked back since.
The newest one is literally telling css “yep, this container is a grid, center the items” and it’s done. Junior UI engineers will never know the pain. Good.
okay, so back in the dark ages, in html3 there wasn’t true horizontal centering. there was a <center> tag that would horizontally center content you enclose in that, but it would not really work for vertical centering, and I’m fairly certain that’s the one you care about. That’s truly goofy. Then html4 came and tables came and that’s when css1 and css2 came out. I believe that was early to mid 90s. With tables, came the table hack where you used valign. Funny thing, this shit is still valid and works and it is used daily. If you receive any newsletters, and they have fancy images, background color, buttons - that is built on the table hack.
Then, the silly hacks got introduced. Backbone.js, underscore.js - these were a must just so a page can work with all the crap people were doing. That’s why… instead of fixing underlying problems of web development, more hacks got introduced. The worst one was the transform hack. You absolutely positioned the element and then used transform to 50% so that made sure that, on a fixed height container, it’ll be centered. You obviously had to plan for the content height itself, etc - hence why it’s the worst one. I hated that one.
I believe the immense pain of doing the transform hack was the reason why finally flex and flexbox were introduced. I have not looked back since.
The newest one is literally telling css “yep, this container is a grid, center the items” and it’s done. Junior UI engineers will never know the pain. Good.
You were fair dinkum. 🤜🏻🤛🏻