Search code examples
javascriptcsstooltipcss-position

JS tooltip position in table cell


I'm using the JS tooltip library https://github.com/chrisdavies/tlite which is lightweight and easy to style.

It works perfectly, except inside a table. I've made a fiddle for easier demonstration : https://jsfiddle.net/El4a/43gudyer/

So just for the sake of having to add code when I use a jsfiddle link:

<table>
<tr>
<td class="tooltip" title="I'm in the wrong position">This doenst work properly
</td>
</tr>
</table>

The above doesn't work.

I have opened an issue on the github, but maybe Stackoverflow will be faster in finding the solution :)


Solution

  • Try this

    table tr td{position:relative;} /** put this code in your stylesheet **/