PDA

View Full Version : Where did this unwanted column come from ?



jeddi
Mar 6th, 2010, 11:43 AM
Hello,

I have a fairly nice table, but it has an extra column
and I can not seem to get rid of it :(

I guess it is something to do with the width definitions.

This is the problem:

http://www.expert-world.com/sys/test_image8.jpg

My table is defined with this in the css:



<table.analyzer{
width:600px;
font-size:14px;
border: 2px solid #ccc;
border-collapse:collapse;
}

table.analyzer td{
border: 1px solid #ccc;
padding:8px 8px;
}




And this in the HTML:



<table cellpadding="0" cellspacing="0" class="analyzer">
<tr style="font-weight:bold; height:40px; background-color:#a9a9a9;"><td width="30px">Pos</td><td style="text-align:left; width:420px;">Product Description</td><td>Earn</td><td>Future</td><td>Comm</td><td>Gravity</td></tr>
<?php
echo "<tr>
<td>$Rctr</td>
<td>$stuff <a href=\"$det_link\"> Detailed Info.</a></td>
<td>$earn</td>
<td>$rebill</td>
<td>$comm</td>
<td>$grav</td>
</tr>
<tr>
<td>$Rctr</td>
<td>$stuff <a href=\"$det_link\"> Detailed Info.</a></td>
<td>$earn</td>
<td>$rebill</td>
<td>$comm</td>
<td>$grav</td>
</tr>

// A couple more rows, then this one:

<tr><td style=\"text-align:left; color:#cc3399;\" colspan=\"6\" ><b>
****************************************************************************
<br><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; CB Analyser Tute by John Simmons: <a href=\"http://www.expert-world.com/im/John-Simmons-niche-affiliate-articles-clickbank-Super-Analyzer-no.1-R63.html\">The Best Use of CB Super Analyzer Tool</a>
<br><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Second Tutorial by John Simmons: &nbsp;&nbsp;&nbsp;<a href=\"http://www.expert-world.com/im/John-Simmons-niche-affiliate-tutorials-Using-CB-Super-Analyzer-Tute01-Q69.html\">Using CB Super Analyzer Tutorial 2</a>
<br><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Third Tutorial by John Simmons: &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href=\"http://www.expert-world.com/im/John-Simmons-niche-affiliate-tutorials-Using-CB-Super-Analyzer-Tute03-Q70.html\">Using CB Super Analyzer Tutorial 3</a>
<br><br>
*****************************************************************************
</b><td><tr>";
?>



I have only specified the width of two of the columns
but for some reason I am getting this extra col on the right hand side.



I have tried adding and subtracting the stars - but nothing helped.


Any ideas ?
Is there a method to calculate these things ?


.

zen-angel
Mar 6th, 2010, 01:55 PM
look at the end of the code you've posted:


</b><td><tr>";

you didn't close properly the first td tag, it has to be like this:


</b></td></tr>";


so your browser was creating two cells on the last tr because of this

HTH

Luca
http://www.zen-angel.com

jeddi
Mar 6th, 2010, 02:42 PM
Oh my :eek:

Don't know how I did that !

Thanks.



.

abduraooft
Mar 6th, 2010, 02:43 PM
Oh my :eek:

Don't know how I did that !

Validator is your friend!