I want a text to shrink and be cut off within a container (no overflow), but to be always followed inline by a link that is always the last item in the container.
This is how far I have come: [https://jsfiddle.net/jamacoe/Lrtokvh2/4
Someone share your knowledge, please.
CSS
.outer {
display: flex;
flex-direction: column;
height: 4em;
font-size: 1em;
border: 1px solid black;
background-color: powderblue;
}
.inner {
}
.title {
flex: 0 0 auto;
font-weight: 600;
}
.text {
flex: 1 1 auto;
}
.more {
flex: 0 0 auto;
}
HTML
<div class="outer">
<div class="title">
Title
</div>
<div class="inner">
<span class="text">
This is a text that can get pretty long. It should break within the box, but it should never exceed the bottom border of the
outer container. If the space is too small, it should not overflow, but be cutted off. The following tailing link should always be visible at the
end of the text.
<span class="more">
[...] <a href="#">more</a>
</span>
</span>
</div>
</div>