Solved

cell wrap

Posted on 2002-04-09
3
984 Views
Last Modified: 2012-05-04
i have not specified anything for wrapping anywhere in my page. however, the text in my table does not wrap in the cell and so the width of the cell increases if the text is more. how do i solve this.
0
Comment
Question by:champs
3 Comments
 
LVL 19

Accepted Solution

by:
webwoman earned 50 total points
ID: 6928409
If the text is long or has nbsp in it, it won't wrap. If it's set a <pre> and doesn't have breaks, it won't wrap. If the longest word is wider than your cell, it will size to fit the longest word.

This is how tables work. If you need breaks, add them. If you have nbsp, take them out. If you need to make the text smaller, do that.

The only other option is to take your text, put it in a graphics program, and make it one big graphic. Then you can force it to look however you want. Of course, anybody with graphics off won't see it, if the image doesn't download they won't see it, it won't be large enough for people with vision problems, screen readers won't interpret it, and it will print really fuzzy.

But you'll get exactly what you want... ;-)
0
 
LVL 33

Expert Comment

by:knightEknight
ID: 6928431
did you restrict the width of your cell to what you want?

<TD width='200'>

or

<TD width='25%'>
0
 
LVL 30

Expert Comment

by:third
ID: 6930256
if you try (won't wrap),

<table border="1" width="50">
<tr>
<td>lllllllllllllloooooonnnnnnnnnnnnnnggggggggtext</td>
</tr>
</table>

but if you set,

<table border="1" width="50">
<tr>
<td>llllllllllllll oooooonnnnnnnnnnnnnngggggggg text</td>
</tr>
</table>

without spaces the cell wont wrap.
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
Javascript_Set_dropdown_value 7 40
Question about traversing a tree using jQuery 7 33
removing a class in javascript 4 48
Html Newline 7 20
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 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.
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…
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…

856 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