?
Solved

cell wrap

Posted on 2002-04-09
3
Medium Priority
?
987 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
[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
3 Comments
 
LVL 19

Accepted Solution

by:
webwoman earned 200 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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

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 add a scalable full-width header using CSS3. Create a new HTML document with an internal stylesheet. Set a tiled background.:  Create a new div and name it Header. Position it with position:absolute at the top…
In this tutorial viewers will learn how to position items using CSS's three positioning types Create a new HTML document with an internal stylesheet.: Create another div in CSS and name it Absolute : Type "position:absolute;" and "top:10px; left:50p…

764 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