Solved

cell wrap

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

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

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

Suggested Solutions

Building a website can seem like a daunting task to the uninitiated but it really only requires knowledge of two basic languages: HTML and CSS.
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…
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…

816 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