Table collapses on Safari

  • Thread starter Thread starter Paul W
  • Start date Start date
P

Paul W

Hi - I generate a table using code similar to the following (simplified),
and this works fine for most browsers/platforms. For Safari on Mac, the
table displays 'vertically collapsed' for rows where there is no 'content'
in the cells. If I put a token " " in each otherwise empty cell, the
table displays fine.

What's going on here? Shouldn't asp.net detect the browser type and figure
out this stuff itself? If so, is this a 'browsercaps' issue? Any
info/suggestions appreciated.

Paul.
-----------------
For n = 1 To gblNumRows
Dim tRow As New TableRow
tRow.Style("height") = "16"

With tRow.Cells
For C = 1 To gblNumCols
Dim tCell1 As New TableCell
.Add(tCell1)
Next
End With
TT.Rows.AddAt(n - 1, tRow)
Next
 
<tr><td></td></tr> is not valid HTML, <tr><td> </td></tr> is. IE will render
both similar, but you cannot guaruntee that all browsers will.

Hope that helps.

Jason Lind
 
Interesting, but doesn't really address my question. Should asp.net render
the cells as <td> </td> if it detects a non-IE browser? I've installed a new
BrowserCaps section from slingfive but it still renders as <td><td> for
safari and Netscape. Any further pointers appreciated.

Paul.
 
Datagrid for instance will put there. But the way you are doing it you have
to manually write that in.

Jason
 
Back
Top