Better late than never, they always say.
Normally I'd use jQuery to solve such a situation. However, when working on a site for a client which required a javascript-less solution, I came up with the following:
<div class="hover-container">
<div class="hover-content">
<p>Content with<br />
normal formatting</p>
</div>
</div>
By using the following css, you get the same situation as with a title:
.hover-container {
position: relative;
}
.hover-content {
position: absolute;
bottom: -10px;
right: 10px;
display: none;
}
.hover-container:hover .hover-content {
display: block;
}
This gives you the option to style it according to your needs as well, and it works in all browsers. Even the ones where javascript is disabled.
Pros:
- You have a lot of influence on the styling
- It works in (nearly) all browsers
Cons:
- It's harder to position the tooltip