tags:

views:

105

answers:

4

Hello,

I used the below word-wrap in a div, but it does not seem to work at all. Any alternatives.

word-wrap: break-word;

This is CSS 3, how about CSS 2 Thanks Jean

A: 

Try:

div.mydiv 
{
    white-space: normal;
}

Above doesn't work.

FF does not support this CSS3 selector as documented here Mozilla.org forum. and Mozilla bug report

Try using overflows or use

text-align:justify;
Kyle Sevenoaks
nope does not work, why the .mydiv?
Jean
`.mydiv` is the classname.
Kyle Sevenoaks
+2  A: 

This is a CSS3 attribute, so make sure that your/the visitors browser supports CSS3.

Tim
I am testing this in chrome and FF
Jean
A: 

Try:

div {

text-align: justify;
white-space: normal !important;

}

and also set a fixed width on the div.

Tim
A: 

Firefox only supports word-wrap from 3.5 (see doc). You can use white-space (doc) for backwards compatibility.

Tgr