Firefox does not word-wrap? 
September 26th, 2006, 08:55 PM
| | | |
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? | 
September 26th, 2006, 09:15 PM
| | | | re: Firefox does not word-wrap?
Lorenzo Thurman wrote: Quote:
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) | 
September 26th, 2006, 09:25 PM
| | | | re: Firefox does not word-wrap?
Lorenzo Thurman wrote: Quote: |
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? Quote: |
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 | 
September 26th, 2006, 09:35 PM
| | | | re: Firefox does not word-wrap?
Lorenzo Thurman wrote: Quote:
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. | 
September 26th, 2006, 10:55 PM
| | | | re: Firefox does not word-wrap?
Johannes Koch wrote: Quote:
Lorenzo Thurman wrote: Quote:
>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> | 
September 26th, 2006, 11:15 PM
| | | | re: Firefox does not word-wrap?
On 2006-09-26, Lorenzo Thurman <lorenzo@diespammerhethurmans.comwrote: Quote:
Johannes Koch wrote: Quote:
>Lorenzo Thurman wrote: Quote:
>>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. | 
September 27th, 2006, 07:35 AM
| | | | re: Firefox does not word-wrap?
Lorenzo Thurman wrote: Quote: |
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) Quote:
.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.) Quote:
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/ | 
September 27th, 2006, 10:05 AM
| | | | re: Firefox does not word-wrap?
Lorenzo Thurman wrote: Quote:
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) | 
September 27th, 2006, 04:55 PM
| | | | re: Firefox does not word-wrap?
Alan Wood wrote: Quote:
Lorenzo Thurman wrote: Quote:
>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. Quote:
<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)
>
| | 
September 28th, 2006, 09:15 AM
| | | | re: Firefox does not word-wrap?
Lorenzo Thurman wrote: Quote:
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) | 
September 28th, 2006, 09:25 AM
| | | | re: Firefox does not word-wrap?
Lorenzo Thurman wrote: Quote:
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) |  | | | | /bytes/about
We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights.
Get the best answers to your questions from over 225,689 network members.
|