Joseph Michael Pesch
VP Programming

HTML Format Issue - Gaps around images in table cells

by 7. October 2008 15:04

Having a line feed in the HTML source can cause an gap (what would appear to be a padding issue).

BAD
<table>
  <tr>
    <td> <!-- the line feed here can cause spacing issues -->
      <img src="..." style="width: 100px; height: 100px" />
    </td> <!-- the line feed here can cause spacing issues -->
  </tr>
</table>

GOOD
<table>
  <tr>
    <td><img src="..." style="width: 100px; height: 100px" /></td>
  </tr>
</table>

Tags:

HTML

Comments are closed