View Full Version : Table help


Chris
08-01-2004, 09:46 PM
I have the following code:


<html>
<head>
<title>Glenview Cottage</title>
<LINK href="main.css" type=text/css rel=stylesheet>
</head>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" border="0">
<table cellSpacing=0 cellPadding=0 width="100%" border=0>
<tbody>
<tr bgcolor=#FFFFFF>
<td height=3></td></tr>
<tr bgcolor=#000000>
<td height=1></td></tr>
<tr bgcolor=#3366cc>
<td bgcolor=#33CC33 height=65>
<table height=65 cellSpacing=0 cellPadding=0 width=750 border=0>
<tbody>
<tr>
<td width=10></td>
<td width=350>
<div class=top align=left>Glenview Cottage</div></td>
<td width=390>
<div class=tagline align=right>Self-catering holiday accomodation</div></td></tr></tbody></

table></td></tr>
<tr bgcolor=#000000>
<td height=1></td></tr>
<tr>
<td bgcolor=#FFFF00>
<table height=18 cellSpacing=0 cellPadding=0 width=760 border=0>
<tbody>
<tr>
<td vAlign=center height=18>
<div class=navtop align=right>
<div align=left></font>
<table cellSpacing=0 cellPadding=0 width="100%" border=0>
<tbody>
<tr>
<td width="100%">
<div align=right><A
href="http://www.hclyde.com/home.htm">HOME</A> <font
color=#000000>-</font> <a
href="http://www.hclyde.com/contact.htm">CONTACT</A> <font
color=#000000>-</font> <a
href="http://www.hclyde.com/photo%20gallery.htm"><SPAN
lang=en-gb>PHOTO
GALLERY</SPAN></A></div></td></tr></tbody></table></div></div></td></tr></tbody></

table></td></tr>
<tr bgcolor=#000000>
<td class=tagline height=1></td></tr>
<tr bgcolor=#cccccc>
<td height=4></td></tr>
<tr bgcolor=#000000>
<td height=1></td></tr>
<tr>
<td><font
face="Arial, Arial, Helvetica"></font>
</tbody></table>
</body></html>


Firstly, can someone clean it up if there are errors in the table. Thanks.

Secondly, how would i get another table down the left hand side so that it is touching the left hand side of the screen, and the table above it. I want it so that I can alter the table height and width and the backround colour.

Anybody who can help me will be much appreciated.

Thanks.
Chris

Shicken
08-02-2004, 11:41 AM
Hm, I'm not sure if this is exactly how you want it. I changed your table size to 740 pixels as well since you had the two top td tags defined as 350 & 390. Add 'em together and you get 740. If you want the table to span the entire width of the screen, let me know and I can change that.

<html>
<head>
<title>Glenview Cottage</title>
<LINK href="main.css" type=text/css rel=stylesheet>
</head>
<body leftmargin=0 topmargin=0 marginwidth=0 marginheight=0 border=0 bgcolor=#FFFFFF>
<table cellspacing=0 cellpadding=0 width=740 border=0>
<tr>
<td align=left width=350 bgcolor=#33CC33 height=65><div class=top>Glenview Cottage</div></td>
<td width=390 bgcolor=#33CC33 height=65 align=right><div class=tagline>Self-catering holiday accomodation</div></td>
</tr>
<tr bgcolor=#000000><td colspan=2 height=1></td>
</tr>
<tr><td colspan=2 bgcolor=#FFFF00 align=right height=18>
<div class=navtop><font color=#000000>
<a href="http://www.hclyde.com/home.htm">HOME</A> -
<a href="http://www.hclyde.com/contact.htm">CONTACT</A> -
<a href="http://www.hclyde.com/photo%20gallery.htm"><SPAN lang=en-gb>PHOTO GALLERY</SPAN>
</div></td>
</tr>
<tr bgcolor=#000000><td colspan=2 height=1></td></tr>
<tr bgcolor=#CCCCCC><td colspan=2 height=4></td></tr>
<tr bgcolor=#000000><td colspan=2 height=1></td></tr>
<tr><td colspan=2>

<table width=100% cellspacing=0 cellpadding=0 border=0>
<tr><td width=200 height=400 bgcolor=FFFF00 valign=top>Side content goes here.</td><td valign=top width=540 bgcolor=#FFFFFF>Page content goes here.<br>Blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah, blah. </td></tr>
</table>

</td></tr>
</table>
</body>
</html>