Solved

Wrapping Text

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

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
align Linkedin sign to the right page 5 35
Form Submit falis 6 33
HTML5 frame 5 25
Just need a little help with this header height please 10 26
SASS allows you to treat your CSS code in a more OOP way. Let's have a look on how you can structure your code in order for it to be easily maintained and reused.
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
In this tutorial viewers will learn how to code links for mobile sites that, once clicked, send a call or text to a specified number. For a telephone link (once clicked, calls a number), begin with a normal "<a href=" link tag. For the href, specify…
In this tutorial viewers will learn how to style a corner ribbon overlay for an image using CSS Create a new class by typing ".Ribbon":  Define the class' "display:" as "inline-block": Define its "position:" as "relative": Define its "overflow:" as …

770 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