I am attempting to accomplish the following:
https://i.sstatic.net/H0pB0.jpg
Successfully implementing ellipsis for a single item is achieved with:
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
However, my challenge lies in truncating two items.
One should appear below the other.
The problem arises when the text is placed inside a div (for flex-direction: column
), as the text-overflow: ellipsis
no longer functions due to being within a container.
How can I replicate the example image above using CSS?