Jump to content

Convert a table layout to divs?

- - - - -

This topic has been archived. This means that you cannot reply to this topic.
4 replies to this topic

#1
An Alien

An Alien

    Programming Professional

  • Members
  • PipPipPipPipPip
  • 260 posts
Is there a converter of some sort that does this? Dreamweaver has this and it works pretty good but the problem is that it converted it into a million divs with styles it made automatically which is even worser than before to read and edit.

#2
BlaineSch

BlaineSch

    Writes binary right handed and hex left handed

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 2,448 posts
You're best bet is redoing it from scratch.

Tables are really for data that needs to be displayed in rows and columns. Layouts really aren't this, but if it's already coded in tables and works, there really isn't much sense in redoing it for no reason other than to fit in with "table-less gurus". It's just a template.

#3
An Alien

An Alien

    Programming Professional

  • Members
  • PipPipPipPipPip
  • 260 posts
Yeah, but tables are slower than css layouts and are the old way of designing. They're 10x harder when you need to edit the layout.

#4
BlaineSch

BlaineSch

    Writes binary right handed and hex left handed

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 2,448 posts
Try recoding it then. There is no automated way of doing it well.

I totally agree with you though, I mean CSS Layouts are much better than tables. If only we could apply CSS to tables, then everything would work amazingly. It might look something like this:
<html>
    <head>
        <title>CSS and Tables</title.>
        <style type="text/css">
            table {
                height: 500px;
            }
            td {
                vertical-align: top;
                color: red;
            }
        </style>
    </head>
    <body>
        <table>
            <tr>
                <td>CSS and Tables!</td>
            </tr>
        </table>
    </body>
</html>


#5
An Alien

An Alien

    Programming Professional

  • Members
  • PipPipPipPipPip
  • 260 posts
yeah, or if tables worked like css.

I think the code you've written would work.