View Single Post
Old 07-18-2005   #6 (permalink)
Uncle Ghed
get nasty!
 
Uncle Ghed's Avatar
 
Join Date: Jun 2005
Location: Rome, Italy
Posts: 82

Send a message via MSN to Uncle Ghed
Colspan gives a <td> tag the capability of spanning itself over more than one cell. Tables in html are a rigid grid, so if you have row with five cells, html wants you to have 5 cells in every row of your table. This is unless you use the colspan attribute, giving it the number of cells you want to span. You can do this vertically too, with the rowspan attribute.

Looks like the problem is that the first cell on the top left corner is too big, and it gives the width attribute to your whole column. You should probably nest a table in your second row to have more freedom...

Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>Energetic Training</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" type="text/css" href="main.css" />
</head>
<body>

<table class="pageborders" align="center" width="750" border="0" cellpadding="0" cellspacing="0">
<!-- Header -->
  <tr>
  	<td class="headerbackground" height=92><img src="http://www.astralplanet.co.uk/test/et/images/title.gif" alt="Energetic Training"></td>
  	<td class="headerbackground" height="92" colspan="2">&nbsp;</td>
  </tr>
<!-- END Header -->
  <tr>
  	<td colspan="2">
  	<!-- NESTED TABLE -->
  		<table border="0" cellpadding="0" cellspacing="0">
  			<tr>
  				<td width="35" align="left" valign="top"><img src="http://www.astralplanet.co.uk/test/et/images/slogan.gif" alt="Enjoy the gift of learning..."></td>
				<!-- Main Content Area -->
					<td width="579" align="center" class="maincontentarea">&nbsp;</td>
				<!-- END Main Content Area -->
				<!-- Navigation -->
					<td width="136" align="right" class="navpanel">&nbsp;</td>
				<!-- END Navigation -->
				</tr>
			</table>
			
		</td>
	</tr>
</table>

</body>
</html>

hope i've helped...
__________________
some day I'll understand why on earth I started drawing...
Uncle Ghed is offline