1

I've seen this and this, and tried both methods to apply word breaking to a span tag. Neither one works in IE8 for me.

Here's the code I'm trying:

.bodyWrap .dashboard .col2 .wrapper .locInfoWrap .nickname { 
    font-size:16px;  
    color:#000;  
    word-wrap:break-word;  
    -ms-word-wrap: break-word; 
    -ms-word-break: break-all;
}

EDITED TO ADD - I just tried adding a width to the span element, like this:

.bodyWrap .dashboard .col2 .wrapper .locInfoWrap .nickname { 
        font-size:16px;  
        color:#000;  
        word-wrap:break-word;  
        -ms-word-wrap: break-word; 
        -ms-word-break: break-all;
        width:100%;
    }

Still looks the same. Help, please! This is a major requirement for our client.

Here's what it ends up looking like (larger version here): enter image description here

What do I need to do to get this to work in IE8?

Community
  • 1
  • 1
EmmyS
  • 11,892
  • 48
  • 101
  • 156
  • you tried setting a width to that span? – malifa Oct 23 '13 at 18:19
  • @razhial - my understanding was that using the ms-specific properties would make it work on elements that don't have layout. The documentation for [-ms-word-wrap](http://msdn.microsoft.com/en-us/library/ms531186%28v=vs.85%29.aspx) indicates that layout is required; [-ms-word-break](http://msdn.microsoft.com/en-us/library/ms531184%28v=vs.85%29.aspx) doesn't say anything about it. – EmmyS Oct 23 '13 at 18:26
  • Wouldn't trust them. ;) No, im sorry, i can't help you then. – malifa Oct 23 '13 at 18:31
  • make that `span` to a block element – Dinesh Kanivu Oct 23 '13 at 18:59
  • The solution in this post worked for me: [http://stackoverflow.com/a/36042412/2383765](http://stackoverflow.com/a/36042412/2383765) – Magnus Mar 16 '16 at 18:34

1 Answers1

3

What ended up working for me was setting the span to have a display of inline-block.

EmmyS
  • 11,892
  • 48
  • 101
  • 156