I'm trying to implement ellipsis and it's partially working - I am having one problem, when I hover on the very long work, it goes on top of the other words. I can't explain it very well, so here's a picture to show what exactly is happening:
Here's my code:
.attachment td {
max-width: 300px;
overflow: hidden;
display: inline-block;
text-overflow: ellipsis;
white-space: nowrap;
}
.attachment td:hover {
overflow: visible;
white-space: normal;
}
<body>
<h1>The text-overflow Property</h1>
<p>Hover over the div below, to see the entire text.</p>
<div class="a">This is some long text that will not fit in the box.</div>
<table class="table table-striped table-hover">
<tbody>
<tr class="attachment hover-parent">
<td>
bhdvbcjkdsbjdhskbcsajdkggfbjaksbfisjkadzhfnisfjdkzvbcds,zhvmcneajsdkzvbdjszvbsdjzkvbdsjzkxvbdscjkvbdcxzjhvbdfshzjkxvbd
</td>
<td>
download
</td>
<td>
delete
</td>
</tr>
</tbody>
</table>
I feel like I'm missing out on one thing, I just can't pin point it. Any help?
Edit:
Here's my desired effect:
Edit:
What I needed was overflow-wrap: breakword;
, thanks Raina