Ye ole Glish has a pretty good article introducing CSS layout over on developer.apple.com, no less. Though I haven't seen anyone on the net work CSS better than this guy, I think he's barking up the wrong tree on one of his points in the above article.
Here's the quote:
But it is wrong to think that the markup is what specified the style; in fact, the browser decides how to display a section header according to internal logic given to it by its programmers. Had they wanted, they might have specified that section headers be displayed italicized, or with an underline. And that is where CSS comes in to the picture. CSS allows you to override the browser's plans for displaying any particular page element or group of elements.
Two beefs. First, to think that html markup doesn't and shouldn't specify style is to think the NBA's style of basketball is still non-contact (or even High School ball for all that matters) or should be. It does and it is. That's what html has been designed to do/evolved into in reality, regardless of its "original mission".
Hey, standards are great. Carefully constructed DIV tags in xhtml 1.0 are great. But when even Glish has to admit that, "... roughly 25% of your site visitors will not be able to see your layout", well, we've got problems.
He also admits in the article that, "... the table layout page will look nearly identical in all browsers dating back to Netscape 1.1..." Well, isn't that the point? If you're not trying to provide uplevel functionality (dynamic sites, like this mapping site (click Query Storms)) that requires you use fancy styles and, more to the point, the object model these styles provide you, so that you can dynamically change the pages' content, you should be shooting to hit the most users possible.
I know there's some talk about using standards to make pages more accessible to people with screenreaders and the like (visually impaired), but I've watched some in action and good html 3.2 works just fine.
If you're just spitting out text & images, use tables. Glish's rewrite of the ADC site using CSS layout is pretty neat technically speaking, and his example of what the ADC site would look like with table borders is pretty heinous indeed, but the CSS layout is a pretty esoteric solution to undo some poor html layout by the Apple folk. The rewrite of the crazily tabled page reminds me a little of bloodletting. The problem might go away three-fourths of the time, but the lone man out in the quartet's really going to be hurting. And it's because you weren't really treating the right problem from the start.
Secondly (and then I'm done), there's the quote, "CSS allows you to override the browser's plans for displaying any particular page element or group of elements." If you wanted to stay true to what browsers were trying to do back in the day, you wouldn't include style at all.
You shouldn't be trying to force one type of display into someone's browser. If I wanted h1 tags tiny and green, Mosaic let me do it. With CSS layout, using mad class names that will differ from one html developer to another, I can't set a "universal stylesheet" in my browser's preferences and expect my headers to be tiny and green. I won't know to look out for <div class="yourSpecialClassThatMeansHeader1">. Or, in this specific case, <div id="top_nav">.
There's a reason why html went the direction it did, away from pure markup and towards style in the tags. Html is a hybrid of sorts, and what you use should be decided on your audience, not on the hope that, one day, you'll realize "... a vision for the future of the internet where the millions and millions and documents available on the web are well-structured documents with markup that accurately describes their contents." Make your pages readable by everyone today. Use Google if you want to experience the "More exciting possibilities [that] include programmable bots which could scour the reaches of the web for the best price on buffalo milk mozzarella or for the latest interview with Britney Spears." Sheesh. :^)
posted by ruffin
at 8/02/2002 01:26:00 PM