Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Word-break:break-word not working in Firefox 21

I've added word-break:break-word to the comments on my site to start breaking up the words when they overflow the comment box, but it doesn't appear to be working in Firefox. I've done a JS fiddle of the setup and it does work. So something must be conflicting but I can't find it for the life of me.

JS Fiddle (working): http://jsfiddle.net/F6K99/6/

Live problem: http://bit.ly/13NcY5F

like image 916
David Avatar asked Jun 17 '13 08:06

David


2 Answers

You can achieve this by the following:

A. Use word-break:break-all; instead of word-break:break-word;

WORKING SOLUTION

B. Or, Use word-wrap: break-word; instead of word-break:break-word;

WORKING SOLUTION

As far as I know, word-break does not have break-word attribute.

Hope this Helps.

like image 140
Nitesh Avatar answered Oct 29 '22 22:10

Nitesh


You have to use the following CSS.

word-break:normal;
word-wrap:normal;

This will work for both Chrome, Firefox.

like image 32
RQ Bukhari Avatar answered Oct 29 '22 20:10

RQ Bukhari