IE leaves unnecessary space after the image

I am creating an HTML email address as

<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td>
  <img src="image.jpg" width="x" height="y" style="margin:0; padding:0; display:block;">
 </td> 
</tr>
<tr>
 <p>Para with lots of text</p>
</tr>
</table>

However, unnecessary space remains at the bottom of the image when viewed in Internet Explorer. How can I get rid of this space?

+3
source share
5 answers

This is not a mistake or anything like that.

Depending on the type of doctype used, different browsers apply certain values ​​to fields, indentation, and border to different elements.

Looking at your code, I don’t see where you set the border of the image to 0. Do this.

, <!DOCTYPE html> . , (, ), .

TR. TD, Sparky672.

+2

HTML <table> . <td></td>.

, <p></p> . ( :. , <p> / , <p> OP)

<table border="0" cellspacing="0" cellpadding="0">
    <tr>
        <td>
            <img src="image.jpg" width="x" height="y" style="margin:0; padding:0; display:block;">
        </td> 
    </tr>
    <tr>
        <td>
             Para with lots of text
        </td>
    </tr>
</table>
+2

<p>, ?

0

table <p>? . IE, , <tr></tr>. , <td> <p>

, ?

0

, IE , , . :

<table border="0" cellspacing="0" cellpadding="0">
<tr><td><img src="image.jpg" width="x" height="y" /></td></tr>
<tr>
 <td><p>Para with lots of text</p></td>
</tr>
</table>

, , , . , .

-2

All Articles