In html, I have a button that contains two icons and a span with text. In css, I use flex and overflow properties in order to truncate the text if it is too long. The code works fine for all browsers, except IE. Here is the example on jsfiddle: https://jsfiddle.net/fu6kfhw9/1/
HTML
<button>
<div class="container">
<i class="fa fa-file-pdf-o" aria-hidden="true"></i>
<span>TestTestTestTest</span>
<i class="fa fa-file-pdf-o" aria-hidden="true"></i>
</div>
</button>
CSS
body, button {
max-width: 100px;
}
.container {
width: 100%;
display: flex;
span {
flex: 1;
overflow: hidden;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
}
Thanks in advance, Mark