Solved

Wrapping Text

Posted on 2002-04-19
5
217 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Bootstrap Columns not Side-by-Side 3 36
Printing a Google Form 2 25
Put radio button in my form but already has components from my database 4 46
Objects on Same Line 2 18
Introduction The Google Maps API offers various ways to draw dynamic and static maps.  Using a combination of PHP and JavaScript, you can draw active JavaScript maps that allow pan-and-zoom in the client browser window.  You can also draw "static" …
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
In this tutorial viewers will learn how add a scalable full-width header using CSS3. Create a new HTML document with an internal stylesheet. Set a tiled background.:  Create a new div and name it Header. Position it with position:absolute at the top…
In this tutorial viewers will learn how to position items using CSS's three positioning types Create a new HTML document with an internal stylesheet.: Create another div in CSS and name it Absolute : Type "position:absolute;" and "top:10px; left:50p…

861 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

Need Help in Real-Time?

Connect with top rated Experts

24 Experts available now in Live!

Get 1:1 Help Now