Search code examples
htmlcross-browserline-breaks

Button text won't line break IE11 (Chrome, IE9 fine)


I am trying to force a line break between two words. It works in the latest version of Chrome and IE9. However, it doesn't work in IE11. I want the button to show one word on one line and the other word on another line. For example,

TestTestTest/
FooFooFooFoo

I don't want the text to wrap, I want to force the second word onto another line. Below is sample code:

http://jsfiddle.net/VM723/

    .BtnSize {
        width: 125px;
    }
    <input type="button" value="TestTestTest/&#10;FooFooFooFoo" class="BtnSize" />

Solution

  • Try this:

    <button type="button">TestTestTest/&#10;FooFooFooFoo</button>