Replacing tables with CSS layout

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • gViscardi

    Replacing tables with CSS layout

    Hello all,

    Ok, so what I am attempting to accomplish is to replace my table-based
    website with a CSS layout site, but I have run into a few hitches. My
    main problem is that currently my website has sliced images that form
    the frame around some text, I take those slices and put them into a
    table and everything comes out fine.
    My table has three rows, the first row has 5 cells, each containing a
    piece of the frame, with the 2nd cell holding a single line of text.
    The second row has 3 cells, the first and last holding frame images
    and the second colspanning to fill the gap with the main content. The
    third row has 3 cells as well, each holding frame images, the second
    spanning to fill the gap with an image.
    Basically, my table code looks like this:

    --code--
    <table border=0 cellspacing=0 cellpadding=0 width=225>
    <tbody>
    <tr>
    <td class="r1c1"></td>
    <td class="r1c2"><d iv class="nav_head er">$title</div></td>
    <td class="r1c3"></td>
    <td class="r1c4"></td>
    <td class="r1c5"></td>
    </tr>
    <tr>
    <td class="r2c1" ></td>
    <td class="r2c2" colspan=3>
    <div class="nav_cont ent">
    &middot; <a href="home.inc" >Home</a<br />
    &middot; <a href="news.inc" >News</a>
    </div>
    </td>
    <td class="r2c5"></td>
    </tr>
    <tr>
    <td class="r3c1"></td>
    <td class="r3c2" colspan=3></td>
    <td class="r3c5"></td>
    </tr>
    </tbody>
    </table>
    --end code--

    Now this table is inserted dynamically (usually multiple times) based
    on database info, each table holding different text with differing
    titles. What I would like to do is attempt to convert this to a more
    updated CSS layout, but am having a hard time trying to do so without
    having 20 or 30 div tags. Am I missing something or with this
    situation would the table actually be the more efficient way to go?

    Thank you for your time and (hopefully) input.

    --
    Greg
    gviscardi@gmail .com

  • dorayme

    #2
    Re: Replacing tables with CSS layout

    In article
    <1175564411.380 418.165620@b75g 2000hsg.googleg roups.com>,
    "gViscardi" <gviscardi@gmai l.comwrote:
    Hello all,
    >
    Ok, so what I am attempting to accomplish is to replace my table-based
    website with a CSS layout site, but I have run into a few hitches. My
    main problem is that currently my website has sliced images that form
    the frame around some text, I t
    Just stop right there! Don't even think about it. Leave it as it
    is. When you have time, redesign the site completely without
    tables and with a totally different look that does not involve
    trying to achieve what you achieved with tables. Ignore what I
    tell you and will suffer terribly ...

    --
    dorayme

    Comment

    Working...