Quantcast
Channel: Active questions tagged flexbox - Stack Overflow
Viewing all articles
Browse latest Browse all 1305

Flexbox with multiline text ellipsis

$
0
0

I've been using the white-space: no-wrap, text-overflow: ellipsis, and overflow: hidden CSS properties to create ellipsis truncation for multiline text. However, this doesn't work when using flexbox.

When using flex, text-overflow: ellipsis seems to truncate the height of the flex-item to a single line always.

Is it possible to use some combination of flex and css ellipsis truncation for multiline text?

<div className="flex-container"><div className="flex-item"><p>long multiline text that i would like to truncate</p></div></div>

I can get it working with single line truncation. Setting the height manually in conjunction with flex + white-space: nowrap doesn't work.


Viewing all articles
Browse latest Browse all 1305

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>