Help with tables...

liunx

Guest
Hello all!<br />
<br />
I am creating a website for Medal of Honour (Honor) and I am using tables with this site. I am using my own graphic border. <br />
<br />
It is hard to explain what it looks like. Use the link at the end. What I need to know is how to get rid of the gaps between each row, so that the borders join up. Please take a look below (click link) to see what I am getting at. <br />
<br />
Also, valign="x" does not seem to work. I have tried all the settings (baseline, bottom, top etc.) I<br />
<br />
Click HERE for example... (<!-- m --><a class="postlink" href="http://trainsimming.tripod.com/Test/index.html">http://trainsimming.tripod.com/Test/index.html</a><!-- m -->)<br />
<br />
You can also Download <!--more--> a zipped (2.21kb) version of this from the attachments.<br />
<br />
:confused: If you don't know how to view the source, in explorer it is:<br />
<br />
View -> Source<br />
<br />
<br />
Thank you all,<br />
<br />
PhantomPhil (Phil)<!--content-->try adding "cellspacing=0" to the table tag.<!--content-->Try margin: 0px in a style sheet for table, td and img tags, e.g. <br />
<br />
<style><br />
TABLE,TD,IMG { margin: 0px; }<br />
</style><!--content-->>> Try adding "cellspacing=0" to the table tag. <<<br />
<br />
<nitpick> but cellspacing="0" would be a tad better </nitpick><!--content-->Ok, no nitpicking .. and phantomPhil already had this in his code to begin with !!<!--content-->I just formatted your existing code and it seems to work now. I don't really know why, but it works for me.<br />
<br />
<br />
<table cellpadding="0" cellspacing="0" border="0"><br />
<tr><br />
<td width="16" height="16"><img src=http://www.htmlforums.com/archive/index.php/"http://trainsimming.tripod.com/Test/Images/standard_border_tlc.gif" height="16" width="16" alt="" border="0" valign="bottom"></td><br />
<td width="130" height="16"><img src=http://www.htmlforums.com/archive/index.php/"http://trainsimming.tripod.com/Test/Images/standard_border_ts.gif" height="16" width="130" alt="" border="0"></td><br />
<td width="16" height="16"><img src=http://www.htmlforums.com/archive/index.php/"http://trainsimming.tripod.com/Test/Images/standard_border_trc.gif" height="16" width="16" alt="" border="0"></td><br />
</tr><br />
<tr><br />
<td height="140" width="16"><img src=http://www.htmlforums.com/archive/index.php/"http://trainsimming.tripod.com/Test/Images/standard_border_ls.gif" height="140" width="16" alt="" border="0"></td><br />
<td width="130"><br />
Content Goes Here<br />
</td><br />
<td width="16" height="140"><img src=http://www.htmlforums.com/archive/index.php/"http://trainsimming.tripod.com/Test/Images/standard_border_rs.gif" height="140" width="16" alt="" border="0"></td><br />
</tr><br />
<tr><br />
<td width="16" height="16"><img src=http://www.htmlforums.com/archive/index.php/"http://trainsimming.tripod.com/Test/Images/standard_border_blc.gif" height="16" width="16" alt="" border="0"></td><br />
<td width="130" height="16"><img src=http://www.htmlforums.com/archive/index.php/"http://trainsimming.tripod.com/Test/Images/standard_border_bs.gif" height="16" width="130" alt="" border="0"></td><br />
<td width="16" height="16"><img src=http://www.htmlforums.com/archive/index.php/"http://trainsimming.tripod.com/Test/Images/standard_border_brc.gif" height="16" width="16" alt="" border="0"></td><br />
</tr><br />
</table><!--content-->believe it our not you don't need valign any where. if you put valign or align in an img, it is for text that is surrounding it. it will not place it inthe cell as you need align in the cell tag.<br />
<br />
and how to fix this is just make sure you code is with no white space.<br />
<br />
these will not work<br />
<br />
<td><img src...> </td><br />
<td><img src...> <br />
</td><br />
<br />
sure you say white space doesn't matter, well take the white space out and see for yourself. it has to be like this<br />
<br />
<td><img src...></td><br />
<br />
notice no space between the start tag and the end tag.<br />
<br />
and jsut to tell you that you idea will not work if the text you put in there is longer than the width of the table, or in the height. your middle cells will not stretch to accomidate the extra length, which will split if the text is longer. you have to use percentages in these and let the img tile.<!--content-->Hello again,<br />
<br />
Thank you all for your help. I don't know why it worked for you, IKLOP!! What browser are your using? I have IE6. I will try the style sheet thing first, then I will try and use percentages, failing that. Thanks for your suggestions<br />
<br />
<br />
Phil<!--content-->it worked for him becasue he brought the tags to were they are suppose to be. you don't need to use style sheets or percentages to get it to work, just make your closing </td> come right after the img tag. that is all you have to do.<!--content-->Sorry about my mis-understanding!<br />
<br />
I have tried that and it works! Thank you very much!!<br />
<br />
Phil<!--content-->
 
Back
Top