CSS, or why I love/hate web design

291 words written by dylan
Posted June 15, 2004 @ 06:09 PM
4 comments

(Caution: Techie web geek talk in this post. Non-geeks can expect to feel clueless.)

I finally had time to tweak the school's search engine knobs this past week. Mind you, this is three years after we installed the dumb thing. Then this hare-brained idea hit me that I should redesign the page so that it's tableless and fits with the rest of the scheme of the site.

That was Friday. It's now Tuesday. I'm close, but I'm still a CSS adjustment or two away from being satisfied with it. The big problem was with how Webinator creates its pages -- it puts a copyright line in the pages it generates on the first line, before any XHTML doctype declaration or html tag.

This is a problem. Why? It borks standards mode in IE6 and drops it into quirks mode. However, Gecko ignores it and stays with standards mode.

This is all fine. I can just drop it into quirks mode universally and live with it... except for the font size keyword problem. IE6/Quirks uses the old IE definition of "medium," while Gecko goes with its old definition. Same size? Abso-frigging not.

I went with ems for sizing the fonts on the search box. It's not the best solution here, but it's quick-n-dirty and doesn't require me to figure out how to undo a five year old mistake in how IE and Gecko render CSS1.

In the end, I think it looks better, and it's tableless. Is going tableless worth six hours of work over three days? I think it is. I don't know why a list of search results needs to be nested in a table.

Oh, wait, I should have used an ordered list, not divs. ARRGH.

Comments

  1. I recently commented on CSS to one of our UI people at Lexis on her blog: http://quenin.blogs.com/upa_conference_2004/2004/06/achieving_exper.html

    What is so frigging bad about tables? You can do stuff in tables in a minute that takes hours in CSS and some things aren't even possible in CSS... which, in the real world, leaves you telling the client "well - that can't be done" because I'm a frigging CSS nazi. That's not a useable technology.

    I put CSS on the shelf with Macs... great stuff but too far from the real world to be truely useful.

    I still use CSS for formating but have pretty much given up on the stupid 45 page articles on how to use it to de-table your site - whatever - better things to do (like rant on your blog). :)

    Posted by: ben | June 16, 2004 06:22 AM

  2. There are some legitimate reasons not to use tables, the strongest of which being that table markup horrendously clutters the document. Tables also assume a certain type of graphical display, which may not be appropriate for some Internet-enabled hand-held and mobile devices.

    I only use tables for things like actual tables of data and calendars. For everything else, relying on CSS makes the content much friendlier for everyone that doesn't use Mozilla, Opera, or IE.

    As for the problem of Webinator inserting stuff before the doctype tag - this is a bug, not a feature, because it makes the pages non-standards-compliant. You had ought to email the people at Thunderstone and ask them to fix the problem.

    Posted by: Dave | June 16, 2004 11:32 AM

  3. What's wrong with tables? Tables _are_ as much a kludge as CSS can be. Tables are inflexible if you actually need to use CSS to transform (like, say, because of ADA issues). Accessibility is a pain with tables. Table code is heavy. Table-tr-td vs div.

    I abandoned tables for divs last year and haven't looked back. Yes, there are a ton of pitfalls and hacks, but there were a lot of them back in the days of Netscape 4, too. You remember how to get a table with a single-pixel black border in both IE 4 and Netscape 4? Double nested tables.

    Mind you, I still use tables, sometimes for formatting, but I avoid them as much as I can for formatting pages.

    And re: Webinator, we're running 2.5, and they know about the bug and fixed it three versions ago. Unfortunately, with our micro-sized IT department and so little time just to do the basic stuff, we haven't been able to upgrade.

    Posted by: dw | June 16, 2004 04:06 PM

  4. Agreed (with both Dave and Dylan). The whole godam industry is a giant hack - this is why I stick with writing 90% back end server code and only do UI work when absolutely necessary. :) I still think the future lies in doing XML data and transforming via XSLT. The XHTML Div/Span ridden soup pot seems as though it'd be pretty useless (but maybe not as useless as table stir fry) without the visualization that CSS gives you. But... anyway... I think this whole web scene will remain to be a mess for sometime to come.

    Posted by: ben | June 17, 2004 07:15 AM