On CSS and modern web design

599 words written by dylan
Posted August 01, 2004 @ 05:20 PM
5 comments

This week I helped interview people for a web/graphic designer. One of the multi-part questions I asked went something like this:

What are the advantages to using CSS in web design? Which do you prefer, tableless design or layout governed by tables?

(I love these long, multi-part questions in interviews. I get to play Grand Inquisitor.)

I was stunned by the responses I received. Some people didn't know what CSS was. Others did know, but their response to the second half was, in summary, "Table designs are better because of browser compatibility issues, and besides, tables are what I know."

There are one browser in use that lack adequate CSS support for tableless design -- Netscape 4. How many people out there are using Netscape 4 for browsing? According to w3schools.com, 0.3%. Opera 7, my least favorite browser in the world (that's another post), has a 2.3% market share, and it's CSS1 compliant. The browser compatibility excuses goes out the window.

What disturbed me more was the almost hostile attitiude some of the interviewees had towards learning the new CSS-based techniques. One person, fresh out of a local web training program, received little (or possibly no) training in CSS and tableless design. Another person just didn't see any practical value in learning CSS, even after I listed a couple of reasons why someone would choose to forego tables. It worried me that someone with web design experience would choose to not read up on the new trends and at least try to understand the basics of tableless design. To me, it showed someone who was not taking web design seriously.

If you asked a doctor about a recent medical innovation, and the doctor's response was, "I heard it doesn't work in some patients, but I haven't read any of the literature, and the videos I've seen of the procedure strike me as too complex and not worth my time to study," what would you think? Let's try that with a real example. Say your gall bladder has so many stones it looks like a beanbag. The doctor tells you they're going to make a massive incision to pull it out, meaning you'll need to be out of work for 4-8 weeks lest the stitches bust. However, you've heard of the new keyhole surgery for gall bladder removal -- small incision, laproscopy, out of work a week, no worries of your pancreas flying out of you at some inopportune moment. You ask your doctor why he prefers doing the old-fashioned surgery methods. "Oh, it doesn't work in some people, and I don't have the time to study how to do it, and it's just not proven." You tell him that it is now the preferred method of pulling out gall bladders, and it's been performed on millions of people. He still shakes his head and says, "I don't have time to read the literature." Wouldn't you grab your painful self and high-tail it out of that doctor's office?

I will admit that I will still use tables for some forms of layout. I had a problem with a search form last week that could only be effectively solved with a table. I do not build templates with tables anymore, though. For every excuse I hear for using tables for layout, I can think of three good reasons to use CSS and divs. If you're planning on getting paid as a web developer, you better learn and understand how CSS and divs work (as well as all the bugs and gotchas) or you better start thinking about a new vocation.

Comments

  1. If even I, a mere theologian, can figure out CSS, and see the immediate advantage of using same, how tough can it be for Web professionals?

    Posted by: Mark Hasty | August 1, 2004 06:33 PM

  2. Apparently, it's pretty hard. OK, it is hard with all the divs and the weird browser compatibility problems, but these were people who were still using the font tag in the sites they submitted. The font tag is to HTML as the station wagon is to the modern car. Its time has passed.

    Posted by: dw | August 1, 2004 09:43 PM

  3. This is how I would answer your question:

    CSS separates style from content, removing needless clutter from Web pages, and (if many pages on your site share one stylesheet) significantly cutting down on bandwidth requirements for non-graphic content. Because pages with CSS stylesheets tend to degrade more gracefully than style embedded in HTML, text-based and PDA browsers have an easier time displaying those pages.

    Layout should be in CSS wherever possible, because it simplifies the HTML code and makes it easier to make large-scale changes in page appearance without having to edit HTML at all. Tables can and should still be used for tables (duh), as well as calendars and the like - that's what they're there for.

    Posted by: Dave | August 1, 2004 10:28 PM

  4. actually - if you're a "web developer" and are planning on getting paid you better learn how to program. "web designers" are graphic artists these days. imho you place way too much importance on css. it's not always the best choice and is about as important in this industry as the difference between java and c# or the difference between a toyota and a ford or linux and microsoft.

    i think you're arguments for using css are pretty good but definitely not a slam dunk... if you had to choose css or tables in the real world you'd be pretty crazy to choose css. in reality both suck - both have huge, massive, gaping holes that scream "i've never actually had to do anything in the real world" ... the whole web scene has a long way to go and i hope something more useable than the haiku css zen koan crap wins out. css isn't complicated... it's overly elegant.

    i mean - let's not support height and width... wtf? let's not allow you to use any of the clients monitor settings... wtf? the very basics aren't there yet - in either css or tables.

    blah, blah, blah

    Posted by: ben | August 2, 2004 05:15 AM

  5. If you want to talk about "Web Development" then the most important skills are scripting and databases. But a lot of the time, the "Web Developer" also has the job of being a "Web Designer".

    By splitting out style and content, you allow the jobs of developer and designer to be separate from each other. This doesn't necessarily mean that you need to hire different people for each job - but it does mean that you can, and that you can have a Web designer design/redesign your site independently from the developer creating the back-end code.

    As for not supporting height and width, I have no idea what you're talking about. The box model in CSS supports both just fine. As for using a person's screen settings, that's what values like "small", "x-large", "2em", and "57%" are for. If anything, CSS goes out of its way to accommodate the user's screen or window settings.

    Posted by: Dave | August 2, 2004 04:35 PM