I have a module in the form:
.container {
width: 250px;
height: 50px;
background: #fffff3;
}
.truncate {
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
}
<div class="container">
<p class="truncate">
<span>Some loooooooooooong name</span>
:
<span>1.7m</span>
m Tall
</p>
</div>
Which should render as:
Some customer name: 1.7m Tall
I want this to truncate so that if the name is too long it will look like:
Some long name...: 1.7m Tall
I've tried using the above truncate class but it appears like this:
Some loooooooooooong name...
With the users height off the screen. What can I do to rectify this?