Is there a way to create a popover using only HTML and CSS? I attempted the code below, but encountered an issue where on mouse hover, the text displays in the same cell and changes the table width. How can I achieve a stylish popover effect for the text?
table td.text {
max-width: 10px;
}
table td.text span {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
display: inline-block;
max-width: 100%;
}
table td.text span:hover {
background-color: #BDE5F8;
overflow: visible;
white-space: normal;
height: auto;
/* just added this line */
}
<table>
<thead>
<tr class="text-center">
<th>Column1</th>
<th>Column2</th>
<th>Column3</th>
</tr>
</thead>
<tr>
<td class="text"><span>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book.</span></td>
<td class="text"><span>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book.</span></td>
<td class="text"><span>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book.</span></td>
</tr>
</table>