HighDots Forums  

Firefox does not word-wrap?

Cascading Style Sheets Layout/presentation on the WWW (comp.infosystems.www.authoring.stylesheets)


Discuss Firefox does not word-wrap? in the Cascading Style Sheets forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Lorenzo Thurman
 
Posts: n/a

Default Firefox does not word-wrap? - 09-26-2006 , 02:05 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?

Reply With Quote
  #2  
Old   
David Dorward
 
Posts: n/a

Default Re: Firefox does not word-wrap? - 09-26-2006 , 03:33 PM






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


Reply With Quote
  #3  
Old   
Harlan Messinger
 
Posts: n/a

Default Re: Firefox does not word-wrap? - 09-26-2006 , 03:51 PM



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.


Reply With Quote
  #4  
Old   
Lorenzo Thurman
 
Posts: n/a

Default Re: Firefox does not word-wrap? - 09-26-2006 , 04:18 PM



Johannes Koch wrote:
Quote:
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>



Reply With Quote
  #5  
Old   
Ben C
 
Posts: n/a

Default Re: Firefox does not word-wrap? - 09-26-2006 , 05:27 PM



On 2006-09-26, Lorenzo Thurman <lorenzo (AT) diespammerhethurmans (DOT) com> wrote:
Quote:
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.


Reply With Quote
  #6  
Old   
Jukka K. Korpela
 
Posts: n/a

Default Re: Firefox does not word-wrap? - 09-27-2006 , 01:49 AM



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 <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.

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



Reply With Quote
  #7  
Old   
Alan Wood
 
Posts: n/a

Default Re: Firefox does not word-wrap? - 09-27-2006 , 04:14 AM




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)



Reply With Quote
  #8  
Old   
Lorenzo Thurman
 
Posts: n/a

Default Re: Firefox does not word-wrap? - 09-27-2006 , 10:32 AM



Alan Wood wrote:
Quote:
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.

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)


Reply With Quote
  #9  
Old   
Alan Wood
 
Posts: n/a

Default Re: Firefox does not word-wrap? - 09-28-2006 , 03:32 AM




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 <br> tags 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)



Reply With Quote
  #10  
Old   
Alan Wood
 
Posts: n/a

Default Re: Firefox does not word-wrap? - 09-28-2006 , 03:37 AM




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 <br> tags 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)



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.