I want to display text after hovering a profile picture. I made the tag "title", but it can not display the text in different paragraphs. Are there alternative ways to do this?
Here is my CSS code:
.tooltip { display:none; position:absolute; border:1px solid #333; background-color:#161616; border-radius:5px; padding:10px; color:#fff; font-size:12px Arial; }
Here is my html code:
<table style="width:100%"> <tr> <td><a><img src="http://2017.igem.org/wiki/images/2/26/Andrew.PNG" width="200" height="200" class="masterTooltip" title="Name: Ching Yuet To; Major/Year: Cell and Molecular Biology/3 "></a></td> <td><img src="http://2017.igem.org/wiki/images/d/de/Venus.PNG" width="200" height="200"></td> <td><img src="http://2017.igem.org/wiki/images/8/84/Cathy.PNG" width="200" height="200"></td> </tr> </table> <script> $(function () { $(document).tooltip({ content: function () { return $(this).prop('title'); } }); }); </script>
source share