Jump to content

[SOLVED] keep table layout when there is a whitespace


xoligy

Recommended Posts

ok im working on my awards page and ive nearly done it but i just went to check it with 1 award and ive noticed the table its in looses its shape here is whats happend:

 

img didnt show: http://img151.imageshack.us/my.php?image=tablessn0.jpg

 

as you can see there are 9cells in total and here is what code im using:

 

<table bgcolor="#003366" width="100%" height="211px" border="0">
  <tr align=center><td><? if ($award[0]>0){ echo '<img src="images/awards/gun-gold.gif"><br>'.$award[0].'<br>Gold Award(s)'; }else{ echo" ";} ?></td><td><? if ($award[1]>0){ echo '<img src="images/awards/gun-silver.gif"><br>'.$award[1].'<br>Silver Award(s)'; }else{ echo" ";} ?></td><td><? if ($award[2]>0){ echo '<img src="images/awards/gun-bronze.gif"><br>'.$award[2].'<br>Bronze Award(s)'; }else{ echo" ";} ?></td></tr>
  <tr align=center><td><? if ($award[3]>0){ echo '<img src="images/awards//medal-gold.gif"><br>'.$award[3].'<br>Gold Award(s)'; }else{ echo" ";} ?></td><td><? if ($award[4]>0){ echo '<img src="images/awards/medal-silver.gif"><br>'.$award[4].'<br>Silver Award(s)'; }else{ echo" ";} ?></td><td><? if ($award[5]>0){ echo '<img src="images/awards/medal-bronze.gif"><br>'.$award[5].'<br>Bronze Award(s)'; }else{ echo" ";} ?></td></tr>
  <tr align=center><td><? if ($award[6]>0){ echo '<img src="images/awards/guntrophy-gold.gif"><br>'.$award[6].'<br>Gold Award(s)'; }else{ echo" ";} ?></td><td><? if ($award[7]>0){ echo '<img src="images/awards/guntrophy-silver.gif"><br>'.$award[7].'<br>Silver Award(s)'; }else{ echo" ";} ?></td><td><? if ($award[8]>0){ echo '<img src="images/awards/guntrophy-bronze.gif"><br>'.$award[8].'<br>Bronze Award(s)'; }else{ echo" ";} ?></td></tr> 
  </table>

i already have echo "$nbso; in all others i can try adding border=0 tho there wshouldnt be one :/

 

IMO, HTML get send to the browser "as is" and the php is for pre-processing before sending out to the browser. Logic tells me to make the cell borders "0"

 

Hope it helps... ;D

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.