Solved

Wrap text problem

Posted on 2008-06-10
5
468 Views
Last Modified: 2008-06-18
Hello Experts.
I have a problem in design view when i have a dynamic text output like:
uuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu.
That's why i did use a code to wrap the text above(if somebody want's to make only a joke ):
<tr><td colspan="2"  height="500" width="240">
<cfset limit = 30>
<cfloop condition="REFindNoCase('\S{#limit+1#}',qVerg.Description)">
<cfset qVerg.Description = Insert(" ",qVerg.Description,REFindNoCase('\S{#limit+1#}',qVerg.Description)+limit-1)>
          </cfloop>
                                          <cfoutput>#qVerg.Description#</cfoutput>
</td></tr>
I don't know why but the code is not working and the text don't wrap.
That what i really want is that i don't want more than 30 characters in 1 line.
Any help?
0
Comment
Question by:Panos
  • 3
5 Comments
 
LVL 6

Expert Comment

by:JapyDooge
ID: 21750726
maybe you can output it in a textarea.

this will have a fixed size. no wordwrap but scrollbars.

or a fixed div with scrollbars
0
 
LVL 2

Author Comment

by:Panos
ID: 21750848
Hello JapyDooge.
Thank you for help but i prefer something that don't allows more that 30 characters in one line.
I have allready tried to do this with textarea but i don't like the result in design.
0
 
LVL 75

Expert Comment

by:Michel Plungjan
ID: 21751067

<table>
<tr><td colspan="2" style="height:500px; width:240px;"> 
<span style="width:100%; overflow:scroll">
I have a problem in design view when i have a dynamic text output like:
uuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu.uuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu.uuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu.uuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu.
That's why i did use a code to wrap the text above(if somebody want's to make only a joke ):
</span></td></tr></table>

Open in new window

0
 
LVL 2

Author Comment

by:Panos
ID: 21751247
Hi mplungjan
This code :<tr><td colspan="2"  height="500" width="240">
<span style="width:100%; overflow:scroll">
<cfoutput>#qVerg.Description#</cfoutput></span>
</td>
has for me no result.
The mistery is that the same code (the first in the question) is wopking for me in another page.
0
 
LVL 2

Accepted Solution

by:
Panos earned 0 total points
ID: 21751323
Hi again.
I found the problem
The ... <cfoutput>#qVerg.Description#</cfoutput>....was in a <cfoutput query.....>  ....</cfoutput>and it was not working .Now i deleted the <cfoutput> and </cfoutput> and it is working:
<cfoutput query.................................>
<cfset limit = 30>
<cfloop condition="REFindNoCase('\S{#limit+1#}',qVerg.Description)">
<cfset qVerg.Description = Insert(" ",qVerg.Description,REFindNoCase('\S{#limit+1#}',qVerg.Description)+limit-1)>
          </cfloop>
                                          #qVerg.Description#.....................................<cfoutput>
0

Featured Post

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

When applying CSS to your HTML, there are many different ways to select which element(s) the CSS applies to.  Some of these selectors are more commonly known and used than others - Here are the more common ones: #X - Matches an ID of X .X - Matche…
This article describes how to create custom column layout styles for Bootstrap. The article uses 5 columns to illustrate the concept, but the principle can be extended to any number of columns.
In this tutorial viewers will learn how to style rounded corners for elements in CSS using the border-radius property Begin with a normal styled element such as a div: To style all four corners of the div to be the same degree of roundness, use the …
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…

776 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question