I am currently working on adding tooltips to images on my website, but I am encountering a issue. The images are floated to the left with three images per row and multiple rows. The tooltip is meant to appear on the right side of the image, which works fine for images on the first row. However, when hovering over images on the second or third row, the tooltip appears in the position where it should be for the third image from the top. What could be causing this issue?
Here is my CSS code:
.friend_img { opacity:0.6; margin:0; width:83.333333px; float:left; }
.friend_img:hover { opacity:1.0; }
.friend span {display:none; padding:2px 3px; margin-left:8px; width:130px;}
.friend:hover span{display:inline; position:absolute; background:#ffffff;
border:1px solid #cccccc; color:#6c6c6c;}
And here is the HTML code:
<a class="friend" href="profile.php?id=32">
<img class="friend_img" src="member.png">
<span>FIRST NAME LAST NAME</span>
</a>