Jump to content

Table not displaying properly - Help?


LifeInBinary
 Share

Recommended Posts

Could someone please copy and paste this into a new .html document and view it in a browser?I tried to get everything to span 600 pixels wide - but as you will see, the bottom table has a gap in it. I think the bottom one is the one that truly is 600 pixels wide - so why is the rest not? Can anybody point out the error in my code for me please?

<html><head><script type="text/javascript">function setfocus() {	document.hours_log.day.focus();}</script></head><body onLoad="setfocus()" bgcolor="#dddddd"><br><br><br><br><br><center><form name="hours_log" action="mailto:myemailaddress@yahoo.com" method="post" enctype="text/plain"><table border="1" cellspacing="0" cellpadding="0"><tr>  <td>    <table border="0" cellspacing="0" cellpadding="0" bgcolor="#ffffff">    <tr>      <td bgcolor="#eeeeee" width="600" colspan="5"><b>LOG HOURS FORM</b></td>    </tr>    <tr>      <td width="600" height="10" colspan="5"></td>    </tr>    <tr>      <td bgcolor="#eeeeee" colspan="2" width="200"><u><b>Date (dd/mm/yy):</b></u></td>      <td width="200"></td>      <td bgcolor="#eeeeee" colspan="2" width="200"><u><b>Type of Hours:</b></u></td>    </tr>    <tr>      <td bgcolor="#eeeeee" width="200" height="10" colspan="2"></td>      <td width="200" height="10"></td>      <td bgcolor="#eeeeee" width="200" height="10" colspan="2"></td>    </tr>    <tr>      <td bgcolor="#eeeeee">Day:</td>      <td bgcolor="#eeeeee" align="right"><input type="text" name="day" size="1" maxlength="2"> </td>      <td width="200"></td>      <td bgcolor="#eeeeee">Consultation</td>      <td bgcolor="#eeeeee" align="right"><input type="radio" name="hour_type" value="consultation"> </td>    </tr>    <tr>      <td bgcolor="#eeeeee">Month:</td>      <td bgcolor="#eeeeee" align="right"><input type="text" name="month" size="1" maxlength="2"> </td>      <td width="200"></td>      <td bgcolor="#eeeeee">Design</td>      <td bgcolor="#eeeeee" align="right"><input type="radio" name="hour_type" value="design"> </td>    </tr>    <tr>      <td bgcolor="#eeeeee">Year:</td>      <td bgcolor="#eeeeee" align="right"><input type="text" name="year" size="1" maxlength="2"> </td>      <td width="200"></td>      <td bgcolor="#eeeeee">Coding</td>      <td bgcolor="#eeeeee" align="right"><input type="radio" name="hour_type" value="coding"> </td>    </tr>    <tr>      <td width="600" height="10" colspan="5"></td>    </tr>    <tr>      <td bgcolor="#eeeeee" colspan="2" width="200"><u><b>Amount of Time:</b></u></td>      <td width="200"></td>      <td bgcolor="#eeeeee" colspan="2" width="200"><u><b>What was Done:</b></u></td>    </tr>    <tr>      <td bgcolor="#eeeeee" width="200" height="10" colspan="2"></td>      <td width="200" height="10"></td>      <td bgcolor="#eeeeee" width="200" height="10" colspan="2"></td>    </tr>    <tr>      <td bgcolor="#eeeeee">Hours:</td>      <td bgcolor="#eeeeee" align="right"><input type="text" name="hours" size="1" maxlength="2"> </td>      <td width="200"></td>      <td bgcolor="#eeeeee" colspan="2" rowspan="3"><textarea rows="3" cols="22"></textarea></td>    </tr>    <tr>      <td bgcolor="#eeeeee">Minutes:</td>      <td bgcolor="#eeeeee" align="right"><input type="text" name="minutes" size="1" maxlength="2"> </td>      <td width="200"></td>    </tr>    <tr>      <td bgcolor="#eeeeee" width="200" height="10" colspan="2"></td>      <td width="200" height="10"></td>    </tr>    <tr>      <td width="600" height="10" colspan="5"></td>    </tr>    </table>    <table border="0" cellspacing="0" cellpadding="0">    <tr>      <td bgcolor="#eeeeee" width="600" height="32"><center><input type="submit" value="Submit"> <input type="reset" value="Reset"></center></td>    </tr>    </table>  </td></tr></table></form></center></body></html>

Link to comment
Share on other sites

Add width in <table> and remove it from the first two <td>'s <table border="0" cellspacing="0" cellpadding="0" bgcolor="#ffffff" width="600px"><tr><td bgcolor="#eeeeee" colspan="5"><b>LOG HOURS FORM</b></td></tr><tr><td height="10" colspan="5"></td></tr>

<table border="1" cellspacing="0" cellpadding="0"><tr><td><table border="0" cellspacing="0" cellpadding="0" bgcolor="#ffffff" width="600px"><tr><td bgcolor="#eeeeee" colspan="5"><b>LOG HOURS FORM</b></td></tr><tr><td height="10" colspan="5"></td></tr><tr><td bgcolor="#eeeeee" colspan="2" width="200"><u><b>Date (dd/mm/yy):</b></u></td><td width="200"></td><td bgcolor="#eeeeee" colspan="2" width="200"><u><b>Type of Hours:</b></u></td></tr><tr><td bgcolor="#eeeeee" width="200" height="10" colspan="2"></td><td width="200" height="10"></td><td bgcolor="#eeeeee" width="200" height="10" colspan="2"></td></tr><tr><td bgcolor="#eeeeee">Day:</td><td bgcolor="#eeeeee" align="right"><input type="text" name="day" size="1" maxlength="2"> </td><td width="200"></td><td bgcolor="#eeeeee">Consultation</td><td bgcolor="#eeeeee" align="right"><input type="radio" name="hour_type" value="consultation"> </td></tr><tr><td bgcolor="#eeeeee">Month:</td><td bgcolor="#eeeeee" align="right"><input type="text" name="month" size="1" maxlength="2"> </td><td width="200"></td><td bgcolor="#eeeeee">Design</td><td bgcolor="#eeeeee" align="right"><input type="radio" name="hour_type" value="design"> </td></tr><tr><td bgcolor="#eeeeee">Year:</td><td bgcolor="#eeeeee" align="right"><input type="text" name="year" size="1" maxlength="2"> </td><td width="200"></td><td bgcolor="#eeeeee">Coding</td><td bgcolor="#eeeeee" align="right"><input type="radio" name="hour_type" value="coding"> </td></tr><tr><td width="600" height="10" colspan="5"></td></tr><tr><td bgcolor="#eeeeee" colspan="2" width="200"><u><b>Amount of Time:</b></u></td><td width="200"></td><td bgcolor="#eeeeee" colspan="2" width="200"><u><b>What was Done:</b></u></td></tr><tr><td bgcolor="#eeeeee" width="200" height="10" colspan="2"></td><td width="200" height="10"></td><td bgcolor="#eeeeee" width="200" height="10" colspan="2"></td></tr><tr><td bgcolor="#eeeeee">Hours:</td><td bgcolor="#eeeeee" align="right"><input type="text" name="hours" size="1" maxlength="2"> </td><td width="200"></td><td bgcolor="#eeeeee" colspan="2" rowspan="3"><textarea rows="3" cols="22"></textarea></td></tr><tr><td bgcolor="#eeeeee">Minutes:</td><td bgcolor="#eeeeee" align="right"><input type="text" name="minutes" size="1" maxlength="2"> </td><td width="200"></td></tr><tr><td bgcolor="#eeeeee" width="200" height="10" colspan="2"></td><td width="200" height="10"></td></tr><tr><td width="600" height="10" colspan="5"></td></tr></table><table border="0" cellspacing="0" cellpadding="0" width="600"><tr><td bgcolor="#eeeeee" height="32"><center><input type="submit" value="Submit"><input type="reset" value="Reset"></center></td></tr></table></td></tr></table>

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...