I am faced with the task of converting a table-heavy page from using HTML tables to using CSS. In the process I'll be taking out all the Javascript (of which 99% is image-rollovers). Is there any easier way to convert from tables to CSS without re-coding the entire thing from scratch?
No. CSS layouts depend on having well structured, semantic and well formed (valid) html. No non-trivial layout is well structured or semantic. Strip out the content and give it proper html markup. Go back then and wrap div elements around the major groupings. Keep in mind that divs are not meant to hold content, they hold groups of other block level elements. Each group represents a styling context. Much like a drawer in a chest. You can move the drawer to other spots in the chest, and you can re-arrange the contents of the drawer without affecting the other drawers. Just start at the top and work down. But nothing works 'til you get the html markup right. cheers, gary
I'm in the process of recreating a site that was done in FP, with tables. I made a simple CSS template, then I copy the text & paste it into my template, then I take out the extra code. There's just too much junk in the old pages to try & fix them IMO.
Erratum: Should read: "No non-trivial table based layout is well structured or semantic." cheers, gary
I would honestly start with a clean slate. Have it open in one window and code from there. That way you know the code and are familiar with the semantic layout of the page. This way you can add comments so people will understand it at a later time. (even though html coded for css is usually pretty easy to read if done right) It will save you time in the long run not having to hunt for why something isn't working or won't validate.