I have This markup
<li>
<img>
<div class="texts">
<h2>Title</h2>
</div>
</li>
and this CSS
li{
display: flex;
flex-wrap: wrap;
}
li img{
align-self: center;
}
li .texts{
flex: 1;
}
li .texts h2{
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
The result is gonna be an small thumbnail image and some texts beside it, i want the .texts
element to fill the remaining horizental space and it does work fine, until i use white-space: nowrap
on the h2
element, when i do that it breakes everything and the .texts
element goes to next line.