I am relatively new to CSS and I am trying to figure out how to display a long line of text with ellipses when it overflows. You can see a working example in this jsfiddle.
However, when you extend the window, the text is limited to 100px due to the max-width: 100px
attribute. Removing the max-width attribute causes the text to never shrink as shown in this example:
https://i.sstatic.net/XFYIn.png
I want the text to expand as much as possible without breaking onto a new line. Here's how it should look for different window widths:
https://i.sstatic.net/r50eN.png
https://i.sstatic.net/6O3rm.png
https://i.sstatic.net/DFLA7.png
Can anyone advise me on how to achieve this?