IE7 adds blank space on word-wrap

I have a div inside a table cell. The div has a word-wrap:break-word. It displays fine in IE8 and Mozilla, however in IE7, the table cell extends to the assumed width of the long word that in fact is broken. As a result I have a large white space next to the div with the text, which extends the table width.


overflow:hidden on the container div nested in the table cell solved the problem

To the CSS of the div, add:

word-wrap: break-word;
-ms-word-wrap: break-word;
white-space: normal;
max-width: < the width you need> ;
word-break: break-all;

This should give you proper word wrap.

Need Your Help

Why does Java Thread.sleep or Date.after() function differently on other computers?

java date sleep

I have a unit test that checks to make sure an object inside my instance is created with a proper Date populated: