> you need to specify an overflow style that allows the table to honor the
> width, as the default is to be at as large as the content.
I am not sure how I would use the overflow style in one cell, but I did find
the problem and it was in the data.
I found the problem was with cells that have long data with no spaces to
break on.
I have the following file that I took from my view source of my page.
I have a table that has 5 cells of defined lengths
(50px,50px,50px,50px,200px)
I found that normally, the table is correct and displays fine. If the data
is too long
it wraps to the next line, which is fine (if there are spaces in the data).
The problem is when I there is a long email where there are no spaces in the
text for the program to break on.
This causes the table to increase the size of the Email cell and all the
other cells are decreased proportionally.
I can substring the data to smaller length but then you lose part of the
email if a person happens to have a very long email name.
Here is an example of the file and table that resulted:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>:: Stw1::</title>
</head>
<body id="myBody">
<br><br>
<table cellspacing="0" cellpadding="1" rules="all" border="1" id="_ctl1"
style="color:Black;background-color:Beige;width:600px;border-collapse:collapse;">
<tr style="background-color:Brown;">
<td style="width:100px;">UserID</td>
<td style="width:100px;">FirstName</td>
<td style="width:100px;">LastName</td>
<td style="width:100px;">Title</td>
<td style="width:200px;">Email</td>
</tr>
<tr>
<td style="width:100px;">152</td>
<td style="width:100px;">Tom</td>
<td style="width:100px;">Lawrence</td>
<td style="width:100px;">CTO1</td>
<td style="width:200px;">tlawrence@ftsw2.com</td>
</tr>
<tr style="background-color:Gainsboro;">
<td style="width:100px;">154</td>
<td style="width:100px;">Brandon</td>
<td style="width:100px;">Franklin</td>
<td style="width:100px;">Owner</td>
<td
style="width:200px;">brandonlFranklinfromtesting@sprint.blackberry.net</td>
</tr>
</table>
</body>
</html>
As you can see the last <td> is the problem. This normally doesn't happen,
but every once and a while it does and messes up the table. I am not sure
how best to solve the problem yet.
I was thinking that the datagrid wasn't getting built correctlly but it was
the data that caused the problem.
Thanks,
Tom
> -- bruce (sqlwork.com)
>
[quoted text clipped - 57 lines]
>>>
>>> Tom