Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / General / July 2005

Tip: Looking for answers? Try searching our database.

Table collapses on Safari

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Paul W - 14 Jul 2005 19:24 GMT
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
Jason L Lind - 14 Jul 2005 20:05 GMT
<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

> 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
[quoted text clipped - 20 lines]
>             TT.Rows.AddAt(n - 1, tRow)
>         Next
Paul W - 14 Jul 2005 21:00 GMT
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.

> <tr><td></td></tr> is not valid HTML, <tr><td> </td></tr> is. IE will
> render
[quoted text clipped - 30 lines]
>>             TT.Rows.AddAt(n - 1, tRow)
>>         Next
Jason L Lind - 14 Jul 2005 21:31 GMT
Datagrid for instance will put   there. But the way you are doing it you have
to manually write that in.

Jason

> 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
[quoted text clipped - 37 lines]
> >>             TT.Rows.AddAt(n - 1, tRow)
> >>         Next

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.