Live data from Hacker News

Ask HN: CSS vs table based layouts

news.ycombinator.com

31–40 of 52 posts

Re: Ask HN: CSS vs table based layouts

#31
Use a good CSS grid framework like Blueprint, Bluetrip, or YUI. They make most supposedly "tricky" CSS layouts (like 3 column liquid) quite easy.

And of course, remember that it's not necessarily an either/or decision. Sometime part of your page really is a grid, and really should be a table.

Re: Ask HN: CSS vs table based layouts

#33
post #10

I'm so glad I'm not the only one that feels this way. As far as I'm concerned, CSS is a miserable piece of work. Witness how hard it is do a simple three column layout. It fails half of the simple edict: Make easy things easy and hard things possible.

Agreed, it was a huge failure to clearly think about designer's problems.

We have decades of experience with real layout models in both traditional graphic design software and in developmental software that has layout manager.

And nobody thought that being able to flow several columns on a webpage would be useful?

Re: Ask HN: CSS vs table based layouts

#34
post #10

I'm so glad I'm not the only one that feels this way. As far as I'm concerned, CSS is a miserable piece of work. Witness how hard it is do a simple three column layout. It fails half of the simple edict: Make easy things easy and hard things possible.

Since when is it hard to do a three column layout with CSS? It is in fact quite easy, and always has been. What has been hard is three columns with a liquid center column that works in Internet Explorer without hacks. That's a Microsoft problem, not a CSS problem.

Re: Ask HN: CSS vs table based layouts

#35
post #29

Earlier quoted context omitted.

That sounds kind of snobby, in that it's largely theoretical but just doesn't work in the real world. It's like trying to explain to someone why a good Napa Cabernet is so much better than the $5 Merlot they like. "Well, it was grown from the Carneros region, fermented in French Oak barrels, then cellared for 10 years." "Yeah, but this Carlo Rossi Paisano tastes better." (and I say this as a devoted wine snob.) CSS i…

>>> "You're moving things around drastically." Funnily enough I just altered two sites this week by moving columns around. One was a simple CSS change, the other was one altered margin declaration and one moved div - I also get to see the alterations as they will appear live in a browser (FF). >>> " Every time I find myself typing style="clear:both" I wonder why the hell I'm doing it." Because of IE? >>> "equally har…

No, columns are awesome, and CSS3 in general looks like it does a lot more to make CSS useful for layouts. HTML 5 + CSS3 is going to be a designer's dream.

Re: Ask HN: CSS vs table based layouts

#36
If you are displaying a table of data, use . grids don't paste well into Excel. Tables really aren't evil, they are a better fit for many tasks where you effectively need a table and can generate the data in row order. Nested tables can be pretty evil. Go with a div grid if you feel the even the hint of wanting to nest.

See the triumph of KML (which mixes content and presentation) over straight GML (separate content and presentation) in the GIS world for comparison.

Re: Ask HN: CSS vs table based layouts

#37
post #17

Although tables is easier than CSS, most browsers will render CSS almost the same way. But not always true for tables. Especially wider sites that need to shrink to fit a screen. I just weigh amount of work I have to do against how much I'm getting paid and do which ever way I feel comfortable with.

"Most browsers will render CSS almost the same way". Either you have an odd definition of most browsers or you are just completely wrong. CSS is implemented differently by most of the major browsers.

Re: Ask HN: CSS vs table based layouts

#38
post #5

Doesn't your question include its answer? Guilt is not a very productive motivation. I've noticed that once people settle on something as "the" right way, they measure everything against that yardstick. This is so common, I wonder if having a yardstick -- an easy way to answer questions -- is the purpose of settling on "the" right way in the first place. Software people do this a lot because software projects are so…

Speaking of "sloppy", Bosworth's site is XHTML served as text/html and says it's UTF-8 when really it's ISO 8859-1. I only know this because it didn't render correctly.

Re: Ask HN: CSS vs table based layouts

#39
post #34
post #10

I'm so glad I'm not the only one that feels this way. As far as I'm concerned, CSS is a miserable piece of work. Witness how hard it is do a simple three column layout. It fails half of the simple edict: Make easy things easy and hard things possible.

Since when is it hard to do a three column layout with CSS? It is in fact quite easy, and always has been. What has been hard is three columns with a liquid center column that works in Internet Explorer without hacks . That's a Microsoft problem, not a CSS problem.

Sorry but that is an understatement. Creating a three column layout is surprisingly hard and completely counter-intuitive and it gets only harder when you want liquid columns. IE is part of the problem but many of the other browsers also had their own quierks until recently.

Creating a n-column layout in CSS, in a sane way, has literally turned into a pseudo-science over the years. That wouldn't be the case if it had ever been as simple as spelling it out the obvious way and adding some IE hacks.

Even todays state of the art solution ("the holy grail") is a fairly strange beast. It admittedly gets away without the nasty hacks and negative margins that previous solutions required - but it took us literally years to arrive there and it's still far from pretty.

Re: Ask HN: CSS vs table based layouts

#40
i used to "slice" my layouts with Adobe ImageReady then customize the generated tag-soup with Dreamweaver. Then i transitionally changed my techniques to adopt full-css templating. It takes me more time but i like the way i can control several page's presentation by changing only one (ore more) file. I also find it more php (or templating system) friendly because there are less tags involved. I find it interesting to see other hacker's point of view on that. It seems like the css way is not THE only way of doing things. Maybe you can get the better of both worlds and use tables for things that looks like tables and use css for what it's made for (i.e :floating stuff, styling fonts).

Not that tables are made to structure the content. It's just easier.

Post reply on HN