Solved

cell wrap

Posted on 2002-04-09
3
982 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

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
Urgent Help with HTML CSS Positioning 9 41
Max-width on individual images in grid 4 51
Javascript create file issue 4 45
Form not operating correctly. 1 22
Popularity Can Be Measured Sometimes we deal with questions of popularity, and we need a way to collect opinions from our clients.  This article shows a simple teaching example of how we might elect a favorite color by letting our clients vote for …
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 to define a gradient in CSS. Create a new HTML document with an internal stylesheet.: Create a div in CSS and name it Gradient. Define the background as "linear-gradient(to right, #ee3668, black)". Ensure you …
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

930 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

8 Experts available now in Live!

Get 1:1 Help Now