.container {
background: tomato;
width: 100px;
display: flex;
}
.text-left {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.text-right {
}
<div class=container>
<div class="text-left">
title title title title
</div>
<div class="text-right">
123
</div>
</div>
In this scenario, I have a container (container
) with two nested divs: text-left
and text-right
.
The width of the container
is already specified. The objective is to truncate the text in the text-left
div if it exceeds the available space, while the content in the text-right
div should always be visible. Various methods were tested here, but only the one utilizing flexbox proved effective. Regrettably, this solution doesn't function as expected in Internet Explorer 10 despite attempts with -ms-
prefixes.
Are there any alternative approaches or tweaks that can ensure compatibility with IE10?