Search code examples
htmlinternet-explorer-8wbr

Does IE8 line-break on a hyphen?


I'm using the <wbr> tag to force firefox to line-break when a hyphenated word can't fit in the space remaining on a line (or row), but according to the quirksmode website IE8 doesn't respect this tag at all.

I can't check for myself, but what would IE8 do with the following markup? Assume that the column is 200px wide, font-size is 16px, and the hyphenated word can't fit .

<p>Blah, blah, blah, cloud-<wbr>based environment, blah, blah, blah.</p>

Here's an image to make things clearer, showing what happens in FF with and without the <wbr> tag.

enter image description here

I realise that IE8 will ignore the tag, but does it line-break on the hyphen like Chrome and Safari do?


Solution

  • Yes, it does. You can check this in Internet Explorer by hitting F12, or by going to Tools > Developer Tools, then changing the Browser Mode and the Document Mode to IE8.