Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Table Border and Background Colours.

Status
Not open for further replies.

bluedollar

Programmer
Jul 24, 2003
174
GB
I have a table with a row containing a <th> and a <td>. I have set the bgcolor on the <tr>, however the colouring is as follows:

---------------------------------------------
: grey : : grey :
---------------------------------------------

There is a gap in the middle between the <th> and <td>. What I wanted is:

----------------------------------------------
: grey :
-----------------------------------------------

The code is shown below:

echo'<tr bgcolor=&quot;#CCCCCC&quot; rules=&quot;none&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; bordercolor=&quot;#999999&quot; cellpadding=&quot;0&quot;><th align=&quot;left&quot;>'.$name.'</th>';
echo'<form name=&quot;type&quot; action=&quot;checkoutscript.php&quot; METHOD=POST>';
echo'<td align=&quot;right&quot; ><input type=&quot;hidden&quot; name=&quot;sel_item_id&quot; value=&quot;'.$i.'&quot;><input type=&quot;image&quot; src=&quot;\\graphics/basketbutton3.gif&quot; name=&quot;cproc&quot;></td></tr>';
echo'</form>';

Does anyone know what I am doing wrong?

Any help would be greatly apprecaited.

Thanks

Dan
 
Put this: cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; bordercolor=&quot;#999999&quot; in your table tag. Put your form tags before and after your table tag - that will get rid of the gap between rows.

There's always a better way. The fun is trying to find it!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top