I am facing a problem with a table containing fixed-width content that doesn't always fit within the designated space. My goal is to truncate the text to a fixed width and add an ellipsis, while allowing the full text to be visible when hovering over it. The current solution works well, but the now visible text overlaps with the text next to it. How can I prevent this issue?
This is the code I have implemented so far:
.truncate {
max-width: 5em;
overflow: hidden;
display: inline-block;
text-overflow: ellipsis;
white-space: nowrap;
}
.truncate:hover {
overflow: visible
}