I created some CSS code for a tooltip element
.toolTip{
display:inline;
position:relative;
}
.toolTip:hover:after{
background: #333;
background: rgba(0,0,0,.8);
border-radius: 5px;
bottom: 26px;
color: #fff;
content: attr(title);
left: 20%;
padding: 5px 15px;
position: absolute;
z-index: 98;
width: 220px;
}
For the HTML:
<p title="tester" class="toolTip">test</p>
<img src="images/people/Tapolci_Jeff_abg_web.png" class="toolTip" title="Jeff T." alt="Jeff Tapolci" />
The tooltip is functioning properly with text content, but not with images. How can I resolve this issue?