|
-
Nov 7th, 2005, 11:20 AM
#1
Thread Starter
Frenzied Member
[RESOLVED] table image spacing
I have a table with an image and even though I set the table border, cell spacing, and cell padding to 0 the image still has vertical space below it.
PHP Code:
<table border="0" cellpadding="0" cellspacing="0">
<tr>
<td>
<img src="image1.gif" />
</td>
</tr>
</table>
When I add a second image below the first there is vertical spacing between them.
PHP Code:
<table border="0" cellpadding="0" cellspacing="0">
<tr>
<td>
<img src="image1.gif" />
</td>
</tr>
<tr>
<td>
<img src="image2.gif" />
</td>
</tr>
</table>
How can I prevent this?
-
Nov 7th, 2005, 05:00 PM
#2
Frenzied Member
Re: table image spacing
wey97:
I think you need to put your Border tag inside the Img tag.
<img src="image1.gif" />
<img src ="image1.gif" Border = 0 />
I'm not sure, but I think this will work.
-
Nov 8th, 2005, 11:38 AM
#3
Fanatic Member
Re: table image spacing
I think you've encountered one of the things I love about IE - it's propensity to add additional whitespace to the rendered page.
Try removing ALL whitespace from between the html tags and see if that doesn't resolve your problem - i.e, change
PHP Code:
<table border="0" cellpadding="0" cellspacing="0">
<tr>
<td>
<img src="image1.gif" />
</td>
</tr>
</table>
to
PHP Code:
<table border="0" cellpadding="0" cellspacing="0"><tr><td><img src="image1.gif" /></td></tr></table>
What bug? That's not a bug. It's an undocumented feature!
-
Nov 10th, 2005, 09:41 AM
#4
Thread Starter
Frenzied Member
Re: table image spacing
Seemed to be just the whitespace between the <td></td>
PHP Code:
<table border="0" cellpadding="0" cellspacing="0">
<tr>
<td><img src="image1.gif" /></td>
</tr>
</table>
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|