Hacker News new | ask | show | jobs
by deanCommie 2617 days ago
There are plenty of developers, myself included, that would prefer to approach tasks like this without having to ever lay our fingers on CSS.
3 comments

You should change fields then. CSS is amazing and not going anywhere.

It's one leg from the tripod letter soup (HTML, CSS and JS) on which the Web stands.

I consider wanting to center something a simple task. Yet the web makes it surprisingly counter-intuitive. So that was why I chose this as an example.

I am intrigued as to how you do this simple centering task without using CSS - it is a web page we are talking about here, not some other application that has sensible layout tools.

So please share what you know - it is a simple task - how do I center something - anything - vertically and or horizontally - in HTML without using CSS?

I'm not sure wether or not to apply Hanlon's razor to the W3C, but regardless, the W3C is to blame for this mess. Took us twenty years to get to Grid based layouts.
And it’s a little ironic that JavaScript’s tongue-in-cheek namesake, Java, had grid based layouts in swing 20 years ago.

OTOH, and to be fair, 20 years ago HTML was for newspaper / magazine like text layout, and grid based layouts are great for single page apps. The thing that’s happened more recently than 20 years is the web changed from text & media content in a static scrolling page layout to all pages are applications.