> I have a table cell that I want to wrap text inside of. I've tried both
> hard and soft wrap, but Firefox refuses to obey. IE 6&7 handle the wrap
> just fine. Does anyone know how I can fix this?

Signature
Johannes Koch
Spem in alium nunquam habui praeter in te, Deus Israel.
(Thomas Tallis, 40-part motet)
>> I have a table cell that I want to wrap text inside of. I've tried
>> both hard and soft wrap, but Firefox refuses to obey. IE 6&7 handle
>> the wrap just fine. Does anyone know how I can fix this?
>
> Please provide the _URL_ to a _minimal_ example that shows what you tried.
I don't have a URL, this is an internal page. Here is the CSS
.rap{
word-wrap: break-word;
}
The textarea and table cell are defined like this:
<td class='rap'><textarea wrap='hard' cols='15' rows='5'></textarea>
Ben C - 26 Sep 2006 23:27 GMT
>>> I have a table cell that I want to wrap text inside of. I've tried
>>> both hard and soft wrap, but Firefox refuses to obey. IE 6&7 handle
[quoted text clipped - 10 lines]
>
><td class='rap'><textarea wrap='hard' cols='15' rows='5'></textarea>
I've never heard of the word-wrap property, break-word, or wrap="hard"!
And I can't find them in CSS 2.1 or HTML 4.0. These must be peculiar to
IE which is why they won't work in Firefox.
Better to stick to W3C standard stuff.
The white-space property is the closest thing in CSS, but AFAIK there's
no way ever to get words broken across lines in CSS 2.1, which I am
guessing is what "break-word" means. Unless you cheat by writing your
content with a zero-width space character between each character? That
might work.
Jukka K. Korpela - 27 Sep 2006 07:49 GMT
> I don't have a URL, this is an internal page.
Then your question doesn't quite belong to the comp.infosystems.www
hierarchy, does it? (www = World Wide Web)
> .rap{
> word-wrap: break-word;
> }
You're using a Microsoft-specific nonstandard CSS property, and now you are
wondering why it does not work on non-Microsoft browsers. (It is true that
word-wrap might exist in some "CSS 3" draft, but they are just sketchy
drafts that have a long way to go to become a recommendation, not to mention
universal implementation.)
> The textarea and table cell are defined like this:
>
> <td class='rap'><textarea wrap='hard' cols='15' rows='5'></textarea>
You haven't told at all what the real problem is. We can just make guesses.
One obvious problem is that you have made the textarea too small, even
ridiculously small. Try and fix that problem, instead of trying to alleviate
some of the symptoms.
The wrap="..." attribute in <textarea> is bad enough; no reason to make
things worse by making words break and users puzzled.
Handle wrapping in the _form handler_. Wrapping user input isn't a CSS
affair, or at least it shouldn't be.

Signature
Jukka K. Korpela ("Yucca")
http://www.cs.tut.fi/~jkorpela/