# Mysterious padding in a table

**URL:** <https://forum.kirupa.com/t/mysterious-padding-in-a-table/212378>\
**Category:** Uncategorized\
**Created:** [January 10, 2007, 5:20pm UTC](https://forum.kirupa.com/t/mysterious-padding-in-a-table/212378 "2007-01-10T17:20:28Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![d4005](https://avatars.discourse-cdn.com/v4/letter/d/839c29/32.png) [@d4005](https://forum.kirupa.com/u/d4005)\
**Post date:** [January 10, 2007, 5:20pm UTC](https://forum.kirupa.com/t/mysterious-padding-in-a-table/212378/1 "2007-01-10T17:20:28Z")

</div>

I’m finding that table rows that I believe shouldn’t be adding anything into the table, are actually adding a row of pixels. I think I must be missing a tag (padding, spacing, border or something) but I just can’t find out what it is.

When I ask for the top offset position of this image, it increases by 1 for each empty row I have in the table before the row with the image in it:

\<table border=0 cellpadding=0 cellspacing=0\>  
\<tr\>\<td\>\</td\>\</tr\>  
\<tr\>\<td\>  
\<img src=“[some-image-path.jpg](http://cole.viewpoint.com/~ddavies/images/dd.jpg)”\>  
\</td\>\</tr\>  
\</table\>

I have a function that gets me the top offset of document.images[0] and with the above table, it’s one more than it should be. If I add another row (\<tr\>\<td\>\</td\>\</tr\>) before the row the images is in, then I get yet another row of pixels.

I’m assuming there’s a tr or td property that I’m missing but all the info sites I look at don’t indicate one that I can see.
