PDA

View Full Version : Tables


Soad
02-03-2006, 01:47 PM
I made a page with frames with the links on the left frame and the rest of the data on the main frame that previews ok in the browsers but I have heard that frames are not the best to use and I should use tables so I am trying to create a page with tables.

The problem I seem to have is creating two table’s at the same level on the page by that I mean one table at the far left and one at the far right so it looks even in the browser but when I try to insert the second table it puts it below my previous table and not on the same alignment

Please help

Thank You

domedia
02-03-2006, 02:14 PM
Just create one table with 2 columns ;)

Soad
02-03-2006, 06:19 PM
Have created a table 1 row and 1 column at 100% inside that I created another table with 1 row and 3 columns at 33% width they are ok in the browsers but when I created a table underneath with 3 columns 2 at 25% for the left and right and 50 for the center

When I insert a table in the left the data just stays to the left I cant center it or anything and if I put a table in the right hand side I cannot move the data to the right and the image in the cenre will not align

Thanks for all your help

see code

<!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>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
<style type="text/css">
<!--
.style1 {
font-size: large;
font-weight: bold;
}
-->
</style>
</head>

<body>


<table width="100%" border="0">
<tr>
<th scope="col"><table width="100%" border="0">
<tr>
<th width="33%" bgcolor="#FFFF00" scope="col"></th>
<th width="33%" scope="col"><span class="style1">TABLE </span></th>
<th width="33%" bgcolor="#999999" scope="col"></th>
</tr>
</table></th>
</tr>
</table>
<table width="100%" border="0">
<tr>
<th width="25" bgcolor="#00FFFF" scope="col"><table width="100%" border="0">
<tr>
<th scope="col">DATA HERE </th>
</tr>
<tr>
<td></td>
</tr>
<tr>
<td></td>
</tr>
<tr>
<td></td>
</tr>
<tr>
<td></td>
</tr>
<tr>
<td></td>
</tr>
</table></th>
<th width="50" bgcolor="#33CCFF" scope="col">mm_travel_photo.jpg</th>
<th width="25" bgcolor="#3399FF" scope="col"><table width="100%" border="0">
<tr>
<th scope="col">DATA HERE</th>
</tr>
<tr>
<td></td>
</tr>
<tr>
<td></td>
</tr>
<tr>
<td></td>
</tr>
<tr>
<td></td>
</tr>
<tr>
<td></td>
</tr>
</table></th>
</tr>
</table>


</p>
</body>
</html>

Creative Insanity
02-03-2006, 06:29 PM
Play with this and see if it suits.

<!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>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
<style type="text/css">
<!--
.style1 {
font-size: large;
font-weight: bold;
}
-->
</style>
</head>

<body>


<table width="100%" border="0">
<tr>
<th scope="col"><table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<th width="33%" bgcolor="#FFFF00" scope="col"><table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td>Some text to see left aligned </td>
</tr>
</table></th>
<th width="33%" scope="col"><table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td><div align="center">some text center aligned </div></td>
</tr>
</table></th>
<th width="33%" bgcolor="#999999" scope="col"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><div align="right">some test right aligned </div></td>
</tr>
</table></th>
</tr>
</table></th>
</tr>
</table>


</p>
</body>
</html>

domedia
02-04-2006, 12:18 AM
Have created a table 1 row and 1 column at 100%
Since that outer table only has one cell it totally redundant, it serves no puprose, just remove it.

Creative Insanity
02-04-2006, 06:03 AM
I would say dom it's purposae would be as a control table.

Soad
02-04-2006, 12:23 PM
Thanks

That worked a treat what did you change in the code ?

Thanks

domedia
02-04-2006, 06:47 PM
I would say dom it's purposae would be as a control table.
<table width="100%" border="0">
<tr>
<th scope="col">
How is that a control table?
It would be tha same as using <div> content here </div> (which also serves no purpose), or it would be the same as having no code at all :P)

Creative Insanity
02-04-2006, 07:15 PM
yeah ok..