This is a discussion on "Strange gaps in table cells" within the Web Page Design section. This forum, and the thread "Strange gaps in table cells are both part of the Design Your Website category.
|
|
|
|
|
![]() |
||
Strange gaps in table cells
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
#1
|
|||
|
|||
|
Strange gaps in table cells
Edit - I think this only occurs in Firefox.
I am making a table for images which are generated from the database, but the layout of them keeps changing. If you go to - http://www.tessacoleman.co.uk/portraits.asp you may or may not see a small gap under the thumbnail in the cell. I put the border on to show it clearly. If you press return on the address again (rather than refresh) it should do it again. If you press refresh it should show up okay, without gap. But refresh and then enter the address again - gaps again! Not sure what I'm doing to cause this... This is my code for the table, if that helps. Thanks. <% sql="SELECT id FROM images WHERE category='portraits' AND live='Y' ORDER BY id" set rs=objconn.execute(sql) if rs.eof then %> sorry no results <%else%> <table border="1" align="center" cellpadding="0" cellspacing="0" style="margin-top:50px; margin-bottom:50px;"> <% col=1 while not rs.eof if col=1 then%> <tr> <td width="120"><span class="tessa1"><!--#include file="browse.asp"--></span></td> <td width="20"> </td> <% col=col+1 else if col=2 then %> <td width="120"><span class="tessa1"><!--#include file="browse.asp"--></span></td> <td width="20"> </td> <% col=col+1 else if col=3 then %> <td width="120"><span class="tessa1"><!--#include file="browse.asp"--></span></td> <td width="20"> </td> <% col=col+1 else if col=4 then %> <td width="120"><span class="tessa1"><!--#include file="browse.asp"--></span></td> <td width="20"> </td> <% col=col+1 else if col=5 then %> <td width="120"><span class="tessa1"><!--#include file="browse.asp"--></span></td> </tr> <tr> <td width="120"> </td> <td width="20"> </td> <td width="120"> </td> <td width="20"> </td> <td width="120"> </td> <td width="20"> </td> <td width="120"> </td> <td width="20"> </td> <td width="120"> </td> </tr> <% col=1 end if end if end if end if end if rs.movenext wend 'finish rows/columns if col=1 then response.write "</tr>" else response.write "</td><td> </td></tr>" %> </table> <%end if%> <%rs.close set rs=nothing%> |
|
|
|
#2
|
|||
|
|||
|
Re: Strange gaps in table cells
It's okay, I managed to find an answer - changing the images to display as block fixed it.
This article is useful for anybody having "gap" problems. http://developer.mozilla.org/en/docs...ysterious_Gaps |
|
#3
|
|||
|
|||
|
Re: Strange gaps in table cells
That's Great!!
|
![]() |
| Tags |
| spacing, gaps, tables |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Strange table cell height issue | niko79 | Web Page Design | 16 | Jun 5th, 2008 10:14 |
| Strange gaps in FF (IE works fine) | Donny Bahama | Web Page Design | 18 | May 28th, 2007 15:31 |
| Table Cells | magiccupcake | Web Page Design | 5 | Jan 23rd, 2007 01:07 |
| Table help with borders of cells... | andrewsco | Web Page Design | 2 | Jun 21st, 2006 22:10 |
| table cells | benbacardi | Web Page Design | 3 | Apr 15th, 2004 15:56 |