Click to See Complete Forum and Search --> : table to CSS nightmare?


rfranzen
01-20-2007, 03:28 AM
Reading the "Tables as Layout" thread led me to wonder about the scope of cleaning up one of my websites to become HTML 4.01 or even XHTML compliant. Remembering the hours I spent hand-coding the tables to look like what I wanted brings back nightmares, and I'm not sure I'm willing to go through it again. This is especially true if substituting CSS for most of the table code is of equivalent difficulty.

Instead of asking you to review the entire 3-page site, let me provide a URL for probably the most difficult (and maybe neatest) things I did.

* http://r0k.us/insurance/gp/gpda.html#nalmic

It is a complex set of nested tables. Actually there are two sets -- click the "click here" link to have the 2nd table essentially superimpose itself over the first, and vice versa. It's actually just shifting position in the page, but that's not immediately obvious.

Would any of you sane people want to rewrite this using CSS? The GlossPinion is a hobby site, with no commercial intent. Upgrading it would be for personal edification and education as much as anything. Still, I hesitate to go down that road; I'm an amateur, especially with CSS. (Not complete amateur; I did upgrade a much large site, The Visible Policy (http://r0k.us/insurance/vp/index.html) to use CSS and be HTML 4.01 compliant).

Fang
01-20-2007, 04:24 AM
Give it a try, a compliant, accessible and semantic site. Even the second site requires a lot of work to make it 'compliant'.

rfranzen
01-20-2007, 08:14 AM
By compliant, I mean "validated" -- you should have seen the site before then! :) I guess there is a lot of work to reach "accessible" and "semantic".

I'm still curious about the scope of revising the nested tables to use CSS instead of HTML table. I'm not strong on CSS, but if I were, about how long would you-all expect it to take? I don't mean all 3 pages, just those two tables.

Fang
01-20-2007, 08:52 AM
The DTD is not valid: http://www.w3.org/QA/2002/04/valid-dtd-list.html

A couple of hours, valid, x-browser.

rfranzen
01-20-2007, 01:00 PM
When I updated the site, the validator didn't complain about the DTD being used. It accepted it as a declaration for HTML 4.01. (Not sure where I got it, probably from someone else's webpage.) It is only recently that the validator has begun reporting something like "validated, but doctype undeclared". I've been fixing it as I have cause to edit pages for some other reason.

{added} ... but, since the index page is the normal entrance into my site, I just updated its DTD.