I'm struggling with implementing ellipsis in my HTML code. Here's what I have:
<div id="wrapper">
<span id="firstText">This text should be displayed with an ellipsis</span>
<span id="lastText">this text should not be affected by the ellipsis</span>
</div>
Is there a way to achieve this using just CSS? Here are my attempts so far:
#firstText
{
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
#lastText
{
white-space: nowrap;
overflow: visible;
}
This is how it currently appears:
This text should be displayed with an ellipsis but ends up being cut off this text shoul
However, this is the desired result:
This text should be e...this text should not change size