|
Posted by Neredbojias on 08/30/07 01:09
Well bust mah britches and call me cheeky, on Wed, 29 Aug 2007 18:49:29
GMT tshad scribed:
> I am having problems with cells that have long data with no spaces to
> break on and was curious as to how others solve this problem.
>
> 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)
>
> Normally, the table is correct and displays fine. If the data is too
> long it wraps to the next line, which is fine.
>
> The problem is when I am using an 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:
>
> <!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-collaps
> e: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.
Put the email address in a div with the same width as the cell (200px)
and set overflow:auto; on the div. 'Course then you'll get a horizontal
scrollbar, but, hey, this isn't Elysium.
What's background-color:Gainsboro;?
--
Neredbojias
Half lies are worth twice as much as whole lies.
[Back to original message]
|