3 ms·
I was going to comment that I took offense to calling table-based layout a hack in the first place. When tables went out of favor, and I saw many, many front en
by hn_throwaway_99 3y ago
I was going to comment that I took offense to calling table-based layout a hack in the first place. When tables went out of favor, and I saw many, many front end dev teams waste cumulative months of time creating a much less understandable web page fiddling with float nonsense all over the place, solely so "purists" could keep their religion in tact, I learned a valuable lesson. Joel Spolsky calls them "Architecture Astronauts" in a great blog post - the types of developers who forget that their job is to actually produce working software that does something well with the least amount of effort (architecture astronauts also gave us the ridiculousness of the first EJB spec, and stuff like the widely derided AbstractFactoryBuilderConstructor nonsense from Java). I feel like I've done a good job over time recognizing these architecture astronaut personalities and staying far away.
- fsckboy 3y agowhat do you mean by "purists" wrt tables? not nesting them or something? or using them only for marking up "relational" data and not page layout? or were these purists from the design side?
- wayfinder 3y agoTables semantically are meant to represent tabular data and using them for layout became “wrong.” From a practical point of view too, if you wanted to make separate mobile and desktop views just by using different stylesheets, using a table made it very difficult. (That said, in 2000, if you were using separate mobile and screen stylesheets, you were in an extreme minority because there were relatively few full HTML web browsers on mobile devices. Instead, most phones, if they could access the Internet, accessed a different version of the Internet accessed over WAP.)
- jenscow 3y agoFor sure. While tables went out of fashion, there was nothing usable to replace them. I was not really interested if those doing a "View Source" are going to be offended by my "incorrect" use of tables.
- Izkata 3y agoCheck out a "View Source" on HN ;)
- ghusbands 3y agoNot everyone who cares about accessibility is an architecture astronaut.
- handy2000 3y agoIIRC non-table based layouts are rendered progressively, while table-based layouts have to be loaded fully first, and only then rendered. At the point when this was relevant, the Web was slow (slow connections, slow rendering engines), so one of the primary motivations for ditching tables for layouts was an increase in the perceived page rendering speed, not just a purist quirk.
- slapo 3y agoI don't think that's accurate. It was old Internet Explorer that wouldn't render tables progressively. See here, where it includes a demo: https://www.vbulletin.org/forum/showthread.php?t=161099 https://www.vbulletin.org/forum/showthread.php?t=161099 Non-table layouts also came into fashion when screen resolutions started to vary more, and some degree of fluidity and responsiveness could've been implemented with non-table layouts while IE was still a target. However, IE was lacking so badly even with IE8 that a lot of CSS that had been a W3C recommendation for years at that point just either didn't work, it was quirky because IE handled the box model a little differently. Ít was one of the reasons why Javascript shims and IE-specific CSS had to help out fairly often.
- handy2000 3y ago> I don't think that's accurate. It was old Internet Explorer that wouldn't render tables progressively. You both agree and disagree with my comment :) If memory serves me right, I started migrating off table layouts at the time when IE6 was still by far the most popular browser (>80% of the market?).
- dreamcompiler 3y agoEvery time I need tabular layout I try the tool du jour: Floats, CSS grid, etc. It never works like I want it to, and I never know if it's because I'm dumb or the tool is poorly-designed, and by then I've wasted two hours, so I always end up just going back to tables because they freaking work.
- bazoom42 3y agoTables just works - as long as you know when and how to use the 1x1 transparent spacer gif.
- ifwinterco 3y agoYep replacing tables with floats is just swapping one hack for another, with its own set of edge cases, browser incompatability etc. The good news is now flexbox and grid work in all modern browsers, so this is (finally) a solved problem
- wayfinder 3y agoFloats were ugly but once you did enough of them, you could nail it every time. It shouldn’t have taken months if you had an experienced team. The only issue with floats was that there were a lot of edge cases that happened in only certain browsers, so you had to be careful. Lots of browser bugs. Job security.