Solved

Wrapping Text

Posted on 2002-04-19
5
219 Views
Last Modified: 2010-04-09
Hello,

Is there any way to force text to wrap within a cell, or even outside of a cell?

Thanks!
0
Comment
Question by:ftbadolato
5 Comments
 
LVL 33

Expert Comment

by:knightEknight
ID: 6954909
specify a width in the cell:

<TD width='200'>
This text will wrap! This text will wrap! This text will wrap!
</td>


or, just use good ole <BR>  :)

This text will most certainly wrap!<BR>
This text will most certainly wrap!<BR>
This text will most certainly wrap!<BR>
0
 
LVL 53

Accepted Solution

by:
COBOLdinosaur earned 50 total points
ID: 6954937
unless, of course it does not have spaces in it, in which case it will not wrap.  

Then it will expand the cell to be the necessary size.

If that is the problem then it needs to have spaces inserted.  If the page is dynamically generated, it will need to have scripting to do that either on the server or with JavaScript on the page.

For IE and Netscrap 6 you can also manupulate it with the style attribute overflow which allows to truncate of use a scrolling div in the cell.

Cd&
0
 
LVL 19

Expert Comment

by:webwoman
ID: 6955026
Define 'wrap'

If you want text to run AROUND a cell, or a table -- you can for a table but not for a cell.

If you want text within a cell to word wrap -- break to the next line automatically -- then what's been given will do it.
0
 

Author Comment

by:ftbadolato
ID: 6955080
The problem was I had no spaces. I was using &nbsp;.  I took those out and just inserted spacebar spaces and it worked!

Thanks!
0
 
LVL 53

Expert Comment

by:COBOLdinosaur
ID: 6955096
Yes a bit tricky, nbsp means non-breaking space.  The look the same as a space, but the browser treats the like a visible character.

Glad we could help.  Thanks for the A. :^)

Cd&
0

Featured Post

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Pass form variable from one web form to another 2 29
Can't get container centered 4 24
Html Newline 7 20
Wordpress Hacked 1 18
Things That Drive Us Nuts Have you noticed the use of the reCaptcha feature at EE and other web sites?  It wants you to read and retype something that looks like this.Insanity!  It's not EE's fault - that's just the way reCaptcha works.  But it is …
This article discusses how to create an extensible mechanism for linked drop downs.
In this tutorial viewers will learn how to style elements, such a divs, with a "drop shadow" effect using the CSS box-shadow property Start with a normal styled element, such as a div.: In the element's style, type the box shadow property: "box-shad…
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…

809 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