Solved

Wrapping Text

Posted on 2002-04-19
5
222 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Why Off-Site Backups Are The Only Way To Go

You are probably backing up your data—but how and where? Ransomware is on the rise and there are variants that specifically target backups. Read on to discover why off-site is the way to go.

Question has a verified solution.

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

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.
Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
In this tutorial viewers will learn how to embed videos in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <video> tag to insert a video. Define the src as the URL of your video; this is similar to …
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

696 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