By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,985 Members | 1,777 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,985 IT Pros & Developers. It's quick & easy.

Replacing tables with CSS layout

P: n/a
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"><div class="nav_header">$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_content">
&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
gv*******@gmail.com

Apr 3 '07 #1
Share this Question
Share on Google+
1 Reply


P: n/a
In article
<11**********************@b75g2000hsg.googlegroups .com>,
"gViscardi" <gv*******@gmail.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
Apr 3 '07 #2

This discussion thread is closed

Replies have been disabled for this discussion.