Welcome to WebmasterWorld Guest from 54.145.13.215

Forum Moderators: incrediBILL

Message Too Old, No Replies

html email images showing white gaps but padding =0 ?

     
12:45 am on Dec 3, 2010 (gmt 0)

New User

5+ Year Member

joined:Oct 16, 2009
posts:24
votes: 0


We are having a continuing issue with our html emails.

The email is made up of 5 images within 5 tables. The padding & border tags are set to "0", yet the email still comes through with white gaps in between the images (as opposed to appearing as 1 solid image)?

Any recommendations?

Thanks,

Jamie
2:07 am on Dec 3, 2010 (gmt 0)

Administrator from US 

WebmasterWorld Administrator incredibill is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Jan 25, 2005
posts:14624
votes: 88


You forgot to mention where you're previewing your emails.

They'll look different in gmail, yahoo mail, outlook, or in web-based email like Horde.
9:34 am on Dec 3, 2010 (gmt 0)

Senior Member from GB 

WebmasterWorld Senior Member 10+ Year Member

joined:Oct 2, 2003
posts: 948
votes: 4


Hi there jamiejohnson37,

you can find a complete explanation of your problem here...
Images, Tables, and Mysterious Gaps [devedge-temp.mozilla.org]

Removing "white space" from your code can effect a cure.

So use this...

<td><img src="myimage.jpg" alt=""></td>

...instead of this...

<td><img src="myimage.jpg" alt=""> 

</td>

Personally I prefer to use CSS display:block or float:left. ;)

birdbrain
11:41 am on Dec 3, 2010 (gmt 0)

Senior Member

WebmasterWorld Senior Member suzyuk is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Oct 1, 2002
posts:5199
votes: 0


The email is made up of 5 images within 5 tables. The padding & border tags are set to "0",


set the images to "display:block;" in the style attribute if you can, also ensure that the <table> code has cellspacing=0 and cellpadding=0 attributes - put it in if it's not there as the default is about 3px IIRC - and also make sure there is no padding on any <TD> CSS code or whitespace in the actual HTML code in the table cells

[edit to add]just saw birdbrains reply - didn't mean to post same reply I have a problem with too many threads open this morning!