Hacker News new | ask | show | jobs
by Saoshyant 1498 days ago
There's absolutely nothing wrong with tables when properly used for data.

The problem being described is that, in the early 00's, there was no easy way to make column layouts with CSS due to IE6 and CSS's own lack of good column handling rules, other than float: left and (later) display: inline-block. This led to most people in web development to produce their page layouts by stacking tables within tables within tables because the end result would visually work properly in every browser. This was, however, an awful way to produce semantic content not to mention the inherit accessibility issues.

Thankfully, by 2006, nearly everyone had already been exposed to the likes of CSS Zen Garden and learned how to workaround with CSS issues to make layout with block elements instead of tables within tables.

4 comments

Yup, no grid, no flex, the only way to ensure your chopped up photoshop design would work was with tables.

Now we don’t use images for everything, we use CSS/iconography/typography/styles. Back then though we didn’t have a whole lot of options in CSS so we used images EVERYWHERE! Drop shadow, that’s a transparent png image. Gradients, jpgs. Animations, gifs. Want to play a video? Real player or flash. It was crude, it was hard, and it was a compatibly nightmare.

Can't say that I still have nightmares about slicing out all those decorative elements out of a PSD file, but I absolutely don't miss that era.
I was explaining how we used to add drop shadows on web pages to one of the younger members of our team a month or two ago and they found it hilarious. An image sliced up into several bits, a table (often embedded in another table) and various other hacks to make everything line up nicely versus a single line of CSS now.

What a time to be alive.

> a compatibly nightmare

With some "giving up", "stopping early" and appending a "...Best viewed on".

Or worse, showing a splash screen that said to please use chrome. Ugh…
I remember doing rounded corners with images inside a 3x3 table!
It was rough early-on. You could do complex layouts with hacks but they worked inconsistently on each browser, CSS itself was inconsistent across browsers, vendor prefixes all over the place. Remember the 'holy grail' layout of three columns, header and footer? Trivial in CSS Grid of course, but practically impossible without tables before.
Let alone trying to get the center section with the 3 columns to fill the available window space. Ugh… So glad those days are over.
It's insane to think now that including your good reasons to avoid them one was also that apparently they slowed down the browser doing the layout. Never experienced it but I'm certain some important figures explained it. Now everything is so slow with all that latest js fad that it sounds like a meme. Things being clunky and slow are accepted.
>There's absolutely nothing wrong with tables when properly used for data.

No, the most annoying thing with front end is new front end developer trying to convert data grip that is obviously meant for tables to divs. Seems like young people trying to be cool to not use tables. Use freaking tables when it is looks like grid, div for other stuff.