Click to See Complete Forum and Search --> : Converting a design with tables to CSS - strip tags?


0sync0
02-14-2008, 11:36 AM
I inherited maintenance duty for a good sized web site that uses tables for layout. Removing the table code by hand would be a huge task. Is there a way to automate stripping out the table tags?

WebJoel
02-14-2008, 12:14 PM
Funny that you should ask that today, -two days ago I met with a client to discuss TABLE-less conversion and that very topic came up. There IS (or maybe, -used to be??) just such a program. A beta-utility, -I have forgotten the name of it but it was quite the quintessential beta-software... it worked sometimes for fairly easy TABLE-less conversions, but it more often than not would completely skew a more complex TABLE-based layout (particularly one with multi-nested elements).
I tried it and quickly grew bored & tired of the mess that it made and just decided to do it by coding by hand.

It is probably easier to just do a re-build of the site using semantics, -naming elements for what they are etc., and doing a visual comparison of placements.
Mostly, develop the content (what you want to say, etc) and then, the presentation (the 'look & feel').

Is this site online or could you provide sample code or screenshot image of site? Often, just seeing the image is enough to get started with.

0sync0
02-14-2008, 01:25 PM
I guess a rebuild would be best.

The site is mumpress.com

WebJoel
02-14-2008, 07:15 PM
I glanced at this, -really, there isn't that much here to re-do. A TABLE-less rebuild for this would be fairly easy.
If I have some extra time tomorrow and this weekend I could knock-out a working template for this. I'm mid-point with some client-work but if find myself with a hour or two, this would be a good excercise.
Most of what I'd need is already available here (the drop-down, the form, the images, etc). Alot of this would be just copy-&-paste of existing code into TABLE-less.

felgall
02-14-2008, 07:35 PM
Provided that the table content already has appropriate semantic parkup it would be just a simple matter of stripp the table tags and style the remaining content. If the content isn't marked up semanitically or if there is actual tabular content in the page then a manual conversion would be the only way to do it properly. Copying the content into a replacement template as webjoel suggests would be the only way to convert that page. Strip out the table from the existing code will not work with the way that the table is used there.

0sync0
02-14-2008, 10:23 PM
I glanced at this, -really, there isn't that much here to re-do. A TABLE-less rebuild for this would be fairly easy.
If I have some extra time tomorrow and this weekend I could knock-out a working template for this. I'm mid-point with some client-work but if find myself with a hour or two, this would be a good excercise.
Most of what I'd need is already available here (the drop-down, the form, the images, etc). Alot of this would be just copy-&-paste of existing code into TABLE-less.
I'm sure I can handle it. I just wanted to see if there was a tool to make the process more efficient.

0sync0
02-15-2008, 01:08 PM
Posting the web site here turned out to have an interesting consequence.
http://www.webdeveloper.com/forum/showthread.php?t=173728

WebJoel
02-15-2008, 01:15 PM
That is pretty sad really... :(

This person clearly does not know about craigslist(dot)com or getafreelancer(dot)com, etc. Basically, s/he should find a place where people are asking for help and willing/offering to pay for it.. :rolleyes: Here, the help is educational and free.
Unsolicited contacts such as this ..not very reputable.