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>

Link to comment
Share on other sites

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

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.