View Full Version : TABLE to DIV

Nov 3rd, 2009, 11:43 AM
in my other thread, somebody posted:

Oh.. NO! Don't you know using tables for layout is very bad?

i visit the of why-table-is-bad link in that thread and found out that instead of table, tr,td etc, DIV is the proper(?) way.

i have here a basic and simple example of an html tabled-layout page.

<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />

<table width="600" border="0" align="center" cellpadding="10" cellspacing="0">
<td colspan="2" bgcolor="#999999"><h1 align="center">HEADING 1</h1></td>
<td colspan="2"><table width="519" border="0" align="center" cellpadding="0" cellspacing="0">
<td width="177" height="125" bgcolor="#FFFF66"><center>
<td width="196" bgcolor="#FFFF99"><center>
<td width="96" bgcolor="#FFFFCC"><center>
<td width="471" bgcolor="#CCCCFF"><center>
<td width="89" bgcolor="#FFFFCC">Extra Data</td>

i don't have any idea on how UN-TABLE layout that page keeping it exactly the way it was(including the way it behaves in the browser)

can somebody help me?

Nov 3rd, 2009, 11:47 AM
Looks like a three column layout to me. Have a look at BonRouge.com (http://bonrouge.com/3c-hf-fixed.php), it has everything you need.

Nov 3rd, 2009, 01:36 PM
You may also find this helpful. (http://www.mardiros.net/liquid-css-layouts.html)

Also much help here. (http://www.exitfegs.co.uk/Sources.html)


Nov 4th, 2009, 06:52 AM
thanx a lot for the links gentlemen!
but if somebody have time, may i kindly request the conversion of my code to NON-TABLEd one. for in my experiences, i've learned best from examples

but i will consider the links for extra knowledge. thanks again guys

Nov 5th, 2009, 06:51 AM
anybody? please ...