Guest_imported
New member
- Jan 1, 1970
- 0
I'm using PHP to output a table in HTML. Depending on however many times it's supposed ot loop it it builds up a table block. It all works fine.
However, if I make cells and don't size them (or even if I do give them size settings) and put an image in, the cell suddenly gets a gap below and/or above the image!!! If I use the same code but say I want the cell to be sized and use the image as a background, it works fine! however, this is a workaround rather than a solution (never good in programming) and also has 1 or 2 side effects of seeing an image tile (which it shouldn't if the cells are the size of the image and they ARE set to be).
So - why does putting an image in a cells mess it up like that? here are the 2 example outputs of html.
<td>
<im src="images/mmtopleft.gif" width=54 height=106>
</td>
The one above makes gaps in the cell that ruin the whole table construction.
<td rowspan=2 background="images/mmtopleft.gif" width=54 height=106>
</td>
The above one makes some cells show the image tiling dispite being set to be the same cellsize as the image (most are ok though)
Any help? Anything at all?!
However, if I make cells and don't size them (or even if I do give them size settings) and put an image in, the cell suddenly gets a gap below and/or above the image!!! If I use the same code but say I want the cell to be sized and use the image as a background, it works fine! however, this is a workaround rather than a solution (never good in programming) and also has 1 or 2 side effects of seeing an image tile (which it shouldn't if the cells are the size of the image and they ARE set to be).
So - why does putting an image in a cells mess it up like that? here are the 2 example outputs of html.
<td>
<im src="images/mmtopleft.gif" width=54 height=106>
</td>
The one above makes gaps in the cell that ruin the whole table construction.
<td rowspan=2 background="images/mmtopleft.gif" width=54 height=106>
</td>
The above one makes some cells show the image tiling dispite being set to be the same cellsize as the image (most are ok though)
Any help? Anything at all?!