The code you have pasted could not generate *huge* spaces between rows. It also depends what you mean by huge. If you do not specify the cellspacing, cellpadding and border attributes in your table tag default values will be used (border spacing 2px and cell padding 1px) and that will cause an extra space (not a huge one in my opinion though). Try giving us a link (or the code) to the exact table that is causing the problems.
Note that there are no tabs and no carriage returns within a table cell or row (<tr><td></td></tr>). This type of table coding works in all browsers and will not produce any spaces between table rows unless you place images in the cells that are of different heights or you use a style sheet that produces different size fonts in table cells within a table row.
There's always a better way. The fun is trying to find it!
I'm embarrassed to say it was a height attribute doing it. But I am catching on.
One thing I have noticed as tviman stated. Putting the <tr> and <td> on one line reduces whitespace(I guess you call it that). I have a tool I work with called Web Matrix. When I do that, it automatically reformats to :
<td>
text
</td>
I have to use notepad to get them to stay on the same line.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.