| 
 Posted by Steve Pugh on 04/03/06 22:08 
dynamota@gmail.com wrote: 
 
>I have a page that has a text area where people can input text. They 
>submit the form and go to the next page which is a "preview" page. The 
>textarea data is displayed in a table/td whose width is set to 400. 
> 
>But if some one puts in a data like 
>ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff 
>ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff 
>ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff 
> 
>It's one continues string with no breaks. 
> 
>How can I display the above text within a 200 width area? I am not able 
>to confine it to a width of 200. Its seems to keep rolling to the 
>right... 
 
Is it 400 or 200? 
 
>Any leads or suggestions will be useful. 
 
Go and hit your users around the head until they stop inputting such 
stupid content. ;-) 
 
You can't make content with no breakable characters break. So either 
insert breakable characters or truncate the content. As you don't know 
the user's chosen font size this will involve some amount of 
guesswork. 
 
If you stop trying to constrict the width of the container then the 
problem will go away for some cases, which leaves you with more time 
to track down and hit around the head the remainder. 
 
	Steve 
--  
"My theories appal you, my heresies outrage you,  
 I never answer letters and you don't like my tie."  - The Doctor 
 
Steve Pugh        <steve@pugh.net>        <http://steve.pugh.net/>
 
[Back to original message] 
 |