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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Annoying 2 pixel gap in image table! 1

Status
Not open for further replies.

BiggerBrother

Technical User
Joined
Sep 9, 2003
Messages
702
Location
GB
Ok, I've checked everything I can think of. I've got a table, and that's all on a page. The table has three rows, and 4 cells in total:

111111111
222222 33
222222 33
222222 33
444444444

The problem is that there is a gap of about 2 pixels between each row. Cell 3 contains a flash file, and the rest are images. Here is the code:

<table cellpadding="0" cellspacing="0" border="0" margin="0">
<tr>
<td colspan=2 height=93>
<img src="top.bmp" width="769">


</td>
</tr>

<tr>
<td width="612" height="605" valign=top>
<img src="left.bmp" width="612" height="605">
</td>

<td width="157" height="605" valign=top>

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" id=flash width=157 height=605 codebase=" <param name="movie" value="flash.swf">
<param name="quality" value="high">
<param name="play" value="true">
<param name="loop" value="true">
<param name="bgcolor" value="#303091">
<SCRIPT LANGUAGE=JavaScript>
<!--
var ShockMode = 0;
if (navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"] && navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin) {
if (navigator.plugins && navigator.plugins["Shockwave Flash"])
ShockMode = 1;
} if (ShockMode ) {
document.write('<embed src="flash.swf"');
document.write(' width=157 height=605 bgcolor="#303091" quality="high" loop="true"');
document.write(' TYPE="application/x-shockwave-flash" PLUGINSPAGE=" document.write('</EMBED>');
} else if (!(navigator.appName && navigator.appName.indexOf("Netscape")>=0 && navigator.appVersion.indexOf("2.")>=0)) { document.write('<IMG SRC="nonflash.gif" width=157 height=605>');
}
//-->
</SCRIPT><NOEMBED><IMG SRC="nonflash.gif" width=157 height=605 BORDER=0></NOEMBED><NOSCRIPT><IMG SRC="nonflash.gif" width=157 height=605 BORDER=0></NOSCRIPT></OBJECT>
</td>

</tr>

<tr>
<td colspan=2>
<img src="base.bmp">

</td>
</tr>
</table>

Any solutions or ideas would be great.

Many thanks

BB
 
Ahhh, whitespace. IE (probably you're not experiencing any problems with Mozilla and the rest) thinks you're trying to put image and some spaces in your <td>s due to your code indenting. I know, stupid. If you get rid of all extra spaces, newlines, tabs and such between the <td>, <img> and </td>, you should be ok:
Code:
<td width="612" height="605" valign="top"><img src="left.bmp" width="612" height="605" alt="" /></td>
 
White space, aaah!

It's the little things that make a big difference.

Many thanks.

BB
 
Just noticed. BMP is not widely accepted web format in addition to being overly bloated. You should convert your images to .jpg, .gif or .png, regarding which would apply best. Much luck.
 
Thanks. The site is only a mock up at the moment for client, with no working links. Rather than create the page with links and table, it's just created in phoshop, with links as static text. When the page is produced and published, it will be made into gifs and jpegs.

Thanks again.

I'd like to give you a star, but my browser won't let me at the moment. Sorry. If anyone else reads this, can you give the post a star? Many thanks


BB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top