doctrin13th
11-03-2009, 10: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">
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
</head>
<body>
<table width="600" border="0" align="center" cellpadding="10" cellspacing="0">
<tr>
<td colspan="2" bgcolor="#999999"><h1 align="center">HEADING 1</h1></td>
</tr>
<tr>
<td colspan="2"><table width="519" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="177" height="125" bgcolor="#FFFF66"><center>
news</center></td>
<td width="196" bgcolor="#FFFF99"><center>
welcome</center></td>
<td width="96" bgcolor="#FFFFCC"><center>
ads</center></td>
</tr>
</table></td>
</tr>
<tr>
<td width="471" bgcolor="#CCCCFF"><center>
Footer</center></td>
<td width="89" bgcolor="#FFFFCC">Extra Data</td>
</tr>
</table>
</body>
</html>
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?
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">
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
</head>
<body>
<table width="600" border="0" align="center" cellpadding="10" cellspacing="0">
<tr>
<td colspan="2" bgcolor="#999999"><h1 align="center">HEADING 1</h1></td>
</tr>
<tr>
<td colspan="2"><table width="519" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="177" height="125" bgcolor="#FFFF66"><center>
news</center></td>
<td width="196" bgcolor="#FFFF99"><center>
welcome</center></td>
<td width="96" bgcolor="#FFFFCC"><center>
ads</center></td>
</tr>
</table></td>
</tr>
<tr>
<td width="471" bgcolor="#CCCCFF"><center>
Footer</center></td>
<td width="89" bgcolor="#FFFFCC">Extra Data</td>
</tr>
</table>
</body>
</html>
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?