By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
431,757 Members | 1,990 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 431,757 IT Pros & Developers. It's quick & easy.

Firefox does not word-wrap?

P: n/a
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?
Sep 26 '06 #1
Share this Question
Share on Google+
10 Replies


P: n/a
Lorenzo Thurman wrote:
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.
--
Johannes Koch
Spem in alium nunquam habui praeter in te, Deus Israel.
(Thomas Tallis, 40-part motet)
Sep 26 '06 #2

P: n/a
Lorenzo Thurman wrote:
I have a table cell that I want to wrap text inside of.
OK, so you put text with work breaks in it and ... the URL of this page is?
I've tried both hard and soft wrap
You've tried what? Those are not values accepted by either the word-break or
text-wrap properties that are proposed for CSS 3 (which is the only thing I
can think of that might apply here).

--
David Dorward <http://blog.dorward.me.uk/ <http://dorward.me.uk/>
Home is where the ~/.bashrc is
Sep 26 '06 #3

P: n/a
Lorenzo Thurman wrote:
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?
Without seeing what you did, how can we know what you did wrong or what
you haven't done that will make a difference? There are no "hard and
soft wrap" properties that apply to table cells.
Sep 26 '06 #4

P: n/a
Johannes Koch wrote:
Lorenzo Thurman wrote:
>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>

Sep 26 '06 #5

P: n/a
On 2006-09-26, Lorenzo Thurman <lo*****@diespammerhethurmans.comwrote:
Johannes Koch wrote:
>Lorenzo Thurman wrote:
>>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>
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.
Sep 26 '06 #6

P: n/a
Lorenzo Thurman wrote:
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 <textareais 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.

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

Sep 27 '06 #7

P: n/a

Lorenzo Thurman wrote:
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?
Firefox wraps happily at spaces, so I suspect that you are using words
or strings that are wider than your table cells.

In this case, Firefox (and all the Mozilla family) won't wrap. I filed
a bug report about this 5 years ago, but it has not been well supported
and nobody is working on it now:

<https://bugzilla.mozilla.org/show_bug.cgi?id=95067>

The same problem used to exist in Opera and Safari. I reported the
same bug in these browsers, and Opera fixed it in a few months and
Apple in a couple of years.

--
Alan Wood
http://www.alanwood.net (Unicode, special characters, pesticide names)

Sep 27 '06 #8

P: n/a
Alan Wood wrote:
Lorenzo Thurman wrote:
>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?

Firefox wraps happily at spaces, so I suspect that you are using words
or strings that are wider than your table cells.

In this case, Firefox (and all the Mozilla family) won't wrap. I filed
a bug report about this 5 years ago, but it has not been well supported
and nobody is working on it now:
Thanks, this addresses my issue most directly. I've done some searching
around the 'net and it seems what I need to do, I can't do. You are
correct about the length of the strings. There are some strings that
will be longer than the alloted space. I'm not sure how to handle this,
but I'll figure out something.
<https://bugzilla.mozilla.org/show_bug.cgi?id=95067>

The same problem used to exist in Opera and Safari. I reported the
same bug in these browsers, and Opera fixed it in a few months and
Apple in a couple of years.

--
Alan Wood
http://www.alanwood.net (Unicode, special characters, pesticide names)
Sep 27 '06 #9

P: n/a

Lorenzo Thurman wrote:
There are some strings that
will be longer than the alloted space. I'm not sure how to handle this,
but I'll figure out something.
One solution is to detect Firefox, and then insert <brtags at
suitable intervals in your long strings.

This is the technique used here:
<http://pubchem.ncbi.nlm.nih.gov/summary/summary.cgi?cid=6435890>

Compare the display of the InChI there and in my data sheet:
<http://www.alanwood.net/pesticides/abamectin.html>

--
Alan Wood
http://www.alanwood.net (Unicode, special characters, pesticide names)

Sep 28 '06 #10

P: n/a

Lorenzo Thurman wrote:
There are some strings that
will be longer than the alloted space. I'm not sure how to handle this,
but I'll figure out something.
One solution is to detect Firefox, and then insert <brtags at
suitable intervals in your long strings.

This is the technique used here:
<http://pubchem.ncbi.nlm.nih.gov/summary/summary.cgi?cid=6435890>

Compare the display of the InChI there and in my data sheet:
<http://www.alanwood.net/pesticides/abamectin.html>

--
Alan Wood
http://www.alanwood.net (Unicode, special characters, pesticide names)

Sep 28 '06 #11

This discussion thread is closed

Replies have been disabled for this discussion.