I have a tooltip solution developed in HTML + CSS:
HTML part:
<a href="#" class="tooltip">
Tooltip
<span>
<strong>Light-weight CSS Tooltip</strong><br />
This is the easy-to-use Tooltip driven purely by CSS.<br/>
And this is some additional text
<br/><br/><br/>
More additional text
</span>
CSS:
a.tooltip {outline:none;}
a.tooltip strong {line-height:30px;}
a.tooltip:hover {text-decoration:none;}
a.tooltip span {
z-index:10;
display:none;
padding:14px 20px;
margin-top:-50px;
margin-left:28px;
width:70%;
line-height:16px;}
a.tooltip:hover span {
display:inline;
position:absolute;
color:#111;
border:1px solid #DCA;
background:#fffAF0;}
a.tooltip span {
border-radius:4px;
box-shadow: 5px 5px 8px #CCC;}
This works very well with an exceptions: If the span displaying the tooltip is to far down on the bottom of the window then the user wont see the whole tooltip.
Is there a way to somehow dynamically position this tooltip so its contents all the time when he hovers to the span?
(I am an absolute rookie in html, so please answer keeping this in mind)
UPDATE: would it be possible to display the tooltip always at the middle of the screen? That would not be a solution for the original problem, but would be a solution for me.