1

I am new to the web. Here I have the following code

<Tooltip title={buyingSessionName} placement="top">
    <Typography className={styles.bgSessionName} variant="body2">
        {buyingSessionName}
    </Typography>
</Tooltip>

Now, I want to wrap the text if it is more than two lines, then I want to wrap that text and show ellipsis.

display: block;
 overflow: hidden;
 text-overflow: ellipsis;
 white-space: nowrap;

But here it is getting for the single line only. I want to do it if it changes to 2 lines.

thanks.

Devang
  • 454
  • 1
  • 8
  • 18
ganesh kaspate
  • 1
  • 9
  • 41
  • 88
  • 1
    Does this answer your question? [How to add ellips to 2 line text in css?](https://stackoverflow.com/questions/60387608/how-to-add-ellips-to-2-line-text-in-css) – Lalji Tadhani Mar 06 '20 at 06:32
  • Look at this article it may give indirect answer https://css-tricks.com/multi-line-truncation-with-pure-css/ – Alan M Mar 06 '20 at 06:42

0 Answers0