word-wrap:break-word not working in IE8

CssInternet Explorer-8Word Wrap

Css Problem Overview


Can anyone please tell me why word-wrap: break-word will not work in IE8?

I have this working in other browsers but IE8 refuses to listen despite reading this post on their site?

http://msdn.microsoft.com/en-us/library/ms531186(VS.85).aspx

Thanks

Css Solutions


Solution 1 - Css

If I recall correctly, word-wrap: break-word; is indeed supported in Internet Explorer 8, but the styled element must have layout.

Solution 2 - Css

I found that to apply word-wrap to a td (table cell) I needed to style the table element with table-layout: fixed. (IE8 standards mode.)

Solution 3 - Css

Try this word-break: break-all; , for IE8 and IE9 it is working :)

Solution 4 - Css

You can use

-ms-word-break: break-all;

Solution 5 - Css

After looking at this example code from Microsoft:
https://msdn.microsoft.com/en-us/library/ms531186%28VS.85%29.aspx

I managed to fix my issues with IE-8 with the following addition to the document and header:

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Strict//EN">

<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />

...and then use this (official) CSS directive:

word-wrap: break-word;

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionSixfoot StudioView Question on Stackoverflow
Solution 1 - CssFrédéric HamidiView Answer on Stackoverflow
Solution 2 - CssMarc StoberView Answer on Stackoverflow
Solution 3 - CssSatish SharmaView Answer on Stackoverflow
Solution 4 - CssAbhishek MehtaView Answer on Stackoverflow
Solution 5 - CssMagnusView Answer on Stackoverflow