I need to truncate the text so that it fills the size of the svg rectangle, and then pops up to full size on the mouse-over . I tried using CSS using the following code to hide the text and then the popup, but it doesn't seem to work.
#text_trunc { width: 100px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; } #text_trunc:hover{ overflow: visible; white-space: normal; width: auto; position: absolute; background-color: rgba(0,0,0,0); }
I created all svg elements using javascript and here I create id for the text element
text.setAttributeNS(null, "id", "text_trunc");
My best guess is that svg creates an image that css cannot truncate ... still need a solution. thanks in advance
source share