size of cell wrong if data long
am 29.08.2007 20:49:29 von tshadI 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:
"http://www.w3.org/TR/html4/loose.dtd">
As you can see the last
but every once and a while it does and messes up the table.
Thanks,
Tom
Re: size of cell wrong if data long
am 29.08.2007 22:19:31 von jkorpelaScripsit tshad:
> I am having problems with cells that have long data with no spaces to
> break on
Such issues have been discussed fairly often in this and other newsgroups.
Check past discussions via Google Groups or otherwise.
> I have a table that has 5 cells of defined lengths
> (50px,50px,50px,50px,200px)
Stop setting fixed widths. Remove all width attributes from HTML and width
property settings in CSS. Consider adding some percentage or em settings
then, _if needed_.
> The problem is when I am using an email where there are no spaces in
> the text for the program to break on.
An email address isn't that long, so if you remove the fixed widths, you
solve the problem (or, rather, stop creating it). An email address should
seldom be broken across lines anyway. If you feel you ever need to do that,
reconsider the design decisions that led to such a situation.
> Here is an example of the file and table:
In future, post a URL, not bulks of code. Hang around and you'll see reasons
to this.
--
Jukka K. Korpela ("Yucca")
http://www.cs.tut.fi/~jkorpela/
Re: size of cell wrong if data long
am 29.08.2007 22:37:05 von TravisNewburyOn Aug 29, 2:49 pm, "tshad"
> I am having problems...
This is one of the issues you have to deal with when you go with a
fixed width design. You have basically 3 choices:
1. Do what Yucca said and abandon the fixed width site.
2. Widen the fixed width to accommodate a wider email column (are you
sure you can you predict what the widest will be?)
3. Leave it alone and don't worry about the exception.
Re: size of cell wrong if data long
am 30.08.2007 03:09:48 von NeredbojiasWell 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:
>
>
> "http://www.w3.org/TR/html4/loose.dtd">
>
>
>
>
>
>
>
> style="color:Black;background-color:Beige;width:600px;border -collaps
> e:collapse;">
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> /td>
>
>
>
>
>
> As you can see the last
> 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.
Re: size of cell wrong if data long
am 30.08.2007 04:38:13 von tshad"Neredbojias" tshad wrote: Jonathan N. Little wrote: Blinky the Shark wrote: Well bust mah britches and call me cheeky, on Fri, 31 Aug 2007 01:23:46 GMT Jonathan N. Little wrote: Neredbojias wrote: Well bust mah britches and call me cheeky, on Fri, 31 Aug 2007 05:27:56 On 2007-08-31, Neredbojias On 2007-08-31, Ben C wrote:
news:Xns999BB8C611833nanopandaneredbojias@198.186.190.161...
> 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:
>>
>>
>> "http://www.w3.org/TR/html4/loose.dtd">
>>
>>
>>
>>
>>
>>
>>
>> id="_ctl1"
>> style="color:Black;background-color:Beige;width:600px;border -collaps
>> e:collapse;">
>>
>> UserID
>> FirstName
>> LastName
>> Title
>> Email
>>
>>
>> 152
>> Tom
>> Lawrence
>> CTO1
>> tlawrence@ftsw2.com
>>
>>
>> 154
>> Brandon
>> Franklin
>> Owner
>>
>> style="width:200px;">brandonlFranklinfromtesting@sprint.blac kberry.net<
>> /td>
>>
>>
>>
>>
>>
>> As you can see the last 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;?
Don't know.
It was on the test file I was using.
Thanks,
Tom
>
> --
> Neredbojias
> Half lies are worth twice as much as whole lies.
Re: size of cell wrong if data long
am 30.08.2007 16:22:20 von lws4art
> "Neredbojias"
> news:Xns999BB8C611833nanopandaneredbojias@198.186.190.161...
>> What's background-color:Gainsboro;?
>
> Don't know.
I'm partial to "background-color: Constable;"
--
Take care,
Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.comRe: size of cell wrong if data long
am 31.08.2007 03:23:46 von Blinky the Shark
> tshad wrote:
>> "Neredbojias"
>> news:Xns999BB8C611833nanopandaneredbojias@198.186.190.161...
>
>>> What's background-color:Gainsboro;?
>>
>> Don't know.
>
> I'm partial to "background-color: Constable;"
Okay, I can get a color out of "Gainsboro" (blue, as in "Blue Boy"), but
what color do you imply with Constable?
--
Blinky RLU 297263
Killing all posts from Google Groups
The Usenet Improvement Project:
http://improve-usenet.org <----------- New Site Aug 28Re: size of cell wrong if data long
am 31.08.2007 04:59:30 von lws4art
> Jonathan N. Little wrote:
>> tshad wrote:
>>> "Neredbojias"
>>> news:Xns999BB8C611833nanopandaneredbojias@198.186.190.161...
>>>> What's background-color:Gainsboro;?
>>> Don't know.
>> I'm partial to "background-color: Constable;"
>
> Okay, I can get a color out of "Gainsboro" (blue, as in "Blue Boy"), but
> what color do you imply with Constable?
>
Oh, maybe a deep green. Old British painters theme...
--
Take care,
Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.comRe: size of cell wrong if data long
am 31.08.2007 05:25:04 von Neredbojias
Blinky the Shark scribed:
> Jonathan N. Little wrote:
>> tshad wrote:
>>> "Neredbojias"
>>> news:Xns999BB8C611833nanopandaneredbojias@198.186.190.161...
>>
>>>> What's background-color:Gainsboro;?
>>>
>>> Don't know.
>>
>> I'm partial to "background-color: Constable;"
>
> Okay, I can get a color out of "Gainsboro" (blue, as in "Blue Boy"), but
> what color do you imply with Constable?
Aluminium, of course. (Cons + Table)
--
Neredbojias
Half lies are worth twice as much as whole lies.Re: size of cell wrong if data long
am 31.08.2007 07:27:28 von Blinky the Shark
> Blinky the Shark wrote:
>> Jonathan N. Little wrote:
>>> tshad wrote:
>>>> "Neredbojias"
>>>> news:Xns999BB8C611833nanopandaneredbojias@198.186.190.161...
>>>>> What's background-color:Gainsboro;?
>>>> Don't know.
>>> I'm partial to "background-color: Constable;"
>>
>> Okay, I can get a color out of "Gainsboro" (blue, as in "Blue Boy"), but
>> what color do you imply with Constable?
>>
> Oh, maybe a deep green. Old British painters theme...
Green as in "landscapes"?
--
Blinky RLU 297263
Killing all posts from Google Groups
The Usenet Improvement Project:
http://improve-usenet.org <----------- New Site Aug 28Re: size of cell wrong if data long
am 31.08.2007 07:27:56 von Blinky the Shark
> Well bust mah britches and call me cheeky, on Fri, 31 Aug 2007 01:23:46 GMT
> Blinky the Shark scribed:
>
>> Jonathan N. Little wrote:
>>> tshad wrote:
>>>> "Neredbojias"
>>>> news:Xns999BB8C611833nanopandaneredbojias@198.186.190.161...
>>>
>>>>> What's background-color:Gainsboro;?
>>>>
>>>> Don't know.
>>>
>>> I'm partial to "background-color: Constable;"
>>
>> Okay, I can get a color out of "Gainsboro" (blue, as in "Blue Boy"), but
>> what color do you imply with Constable?
>
> Aluminium, of course. (Cons + Table)
Huh?
--
Blinky RLU 297263
Killing all posts from Google Groups
The Usenet Improvement Project:
http://improve-usenet.org <----------- New Site Aug 28Re: size of cell wrong if data long
am 31.08.2007 11:41:18 von Neredbojias
GMT Blinky the Shark scribed:
>>>>>> What's background-color:Gainsboro;?
>>>>>
>>>>> Don't know.
>>>>
>>>> I'm partial to "background-color: Constable;"
>>>
>>> Okay, I can get a color out of "Gainsboro" (blue, as in "Blue Boy"),
>>> but what color do you imply with Constable?
>>
>> Aluminium, of course. (Cons + Table)
>
> Huh?
Convicts => prison inmates. Their lunch/dinner tables...
Oh, all right, it was a stretch.
--
Neredbojias
Half lies are worth twice as much as whole lies.Re: size of cell wrong if data long
am 31.08.2007 12:29:27 von Ben C
> Well bust mah britches and call me cheeky, on Fri, 31 Aug 2007 05:27:56
> GMT Blinky the Shark scribed:
>
>>>>>>> What's background-color:Gainsboro;?
>>>>>>
>>>>>> Don't know.
>>>>>
>>>>> I'm partial to "background-color: Constable;"
>>>>
>>>> Okay, I can get a color out of "Gainsboro" (blue, as in "Blue Boy"),
>>>> but what color do you imply with Constable?
>>>
>>> Aluminium, of course. (Cons + Table)
>>
>> Huh?
>
> Convicts => prison inmates. Their lunch/dinner tables...
>
> Oh, all right, it was a stretch.
Not a bad crossword clue.Re: size of cell wrong if data long
am 03.09.2007 23:32:30 von cfajohnson
> On 2007-08-31, Neredbojias
>> Well bust mah britches and call me cheeky, on Fri, 31 Aug 2007 05:27:56
>> GMT Blinky the Shark scribed:
>>
>>>>>>>> What's background-color:Gainsboro;?
>>>>>>>
>>>>>>> Don't know.
>>>>>>
>>>>>> I'm partial to "background-color: Constable;"
>>>>>
>>>>> Okay, I can get a color out of "Gainsboro" (blue, as in "Blue Boy"),
>>>>> but what color do you imply with Constable?
>>>>
>>>> Aluminium, of course. (Cons + Table)
>>>
>>> Huh?
>>
>> Convicts => prison inmates. Their lunch/dinner tables...
>>
>> Oh, all right, it was a stretch.
>
> Not a bad crossword clue.
Where inmates eat policeman (9)
--
Chris F.A. Johnson
============================================================ =======
Author:
Shell Scripting Recipes: A Problem-Solution Approach (2005, Apress)