HTML table's

admin

Administrator
Staff member
First time here so forgive me if the code i just pasted doesn't show up properly. I'm not sure if these forums are html code friendly :P Anywho, my problem is.. I have a table set up on my page, then another table inside it.. i don't want the table inside to have a border but i do want the main one that goes around it to have one. A border does show up on it but its not 1 size thick, it's equiv of two an it's too thick an i can't work out why. Thanks in advance for any help <br />
<br />
<br />
<table border='1' width='100%' height='100%' bgcolor='#FFFFEE' bordercolor='teal' cellspacing='0' cellpadding='0'><tr><td align='right'><br />
<table border='0' width='23%' height='100%' bgcolor='#FFFFFF'><br />
<tr><td><br />
blah blah 'java script here'<br />
blah blah 'another java script here'<br />
</table><br />
</table><!--content--><table cellpadding="0" cellspacing="0" border="1"><br />
<tr><br />
<td><br />
<table cellpadding="0" cellspacing="0" border="0"><br />
<tr><br />
<td>blahblah</td><br />
</tr><br />
</table><br />
</td><br />
<tr><br />
</table><!--content-->Here's the best way to do it... Table within a table is fine. Set the both to the size you want but put a cellpading of 1 on the main table NOT the inner table. Set the color you want to the Bg color of the main table and set the inner table bg to a different color. Here's the code for you...<br />
<br />
<table width="100%" height="100%" border="0" cellpadding="1" cellspacing="0" bgcolor="teal"><br />
<tr><br />
<td align="center" valign="middle"><table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF"><br />
<tr><br />
<td>&nbsp;</td><br />
</tr><br />
</table></td><br />
</tr><br />
</table><br />
<br />
Hope this helps<!--content-->Drop the <height> tag in the <table> tag as it isnt valid HTML.<br />
<br />
If you need to define height then you will have to do it from the <td> tag instead.<!--content-->It's all fixed now.. Thanks for the help guys :)<!--content-->im not sure if mewmew had the same problem but wen i type <TABLE BORDER"1"> it comes up with a 2 line border? please help!<!--content-->
 
Back
Top