Hi,
Ok I see what you mean and perhaps the best way is to go back to the original method using inline elements to simplify it all. It also makes more semantic sense now that you want these tips in the middle of inline text.
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<style type="text/css">
span.tooltip {
position:relative;
display:inline-block;
cursor:pointer;
}
span.tooltip em{
text-decoration:underline;
font-style:normal;
color:red;
}
span.tooltip b {
padding: 10px;
border: 1px solid #999999;
width: 235px;
font-size: 12px;
color: #000000;
background-color: #CCCCCC;
position: absolute;
margin:-999em 0 0 -15px;
z-index:999;
font-weight:normal;
top:0;
}
span.tooltip:hover b {
margin:1.5em 0 0 -15px;
}
</style>
<!--[if lte IE 7]>
<style type="text/css">
span.tooltip:hover b {
margin:1.1em 0 0 -5px;
left:10px;
}
</style>
<![endif]-->
</head>
<body>
<p>The use of XHTML & CSS has been documented throughout the internet <span class="tooltip"><em>here</em> <b>This is a test description.<br>
with 2 lines and a <a href="#">link</a></b></span> and more information can be <span class="tooltip"><em>found here also</em> <b>This is a test description.<br>with 2 lines and a <a href="#">link</a></b></span>. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nunc sed velit velit, vel auctor erat. Cras lobortis dictum lectus, dignissim luctus tellus consequat et. Nam sed urna erat, in mattis sapien. </p>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nunc sed velit velit, vel auctor erat. Cras lobortis dictum lectus, dignissim luctus tellus consequat et. Nam sed urna erat, in mattis sapien. Praesent placerat erat accumsan risus accumsan pharetra sollicitudin dolor lacinia. Sed sodales suscipit ipsum quis cursus. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos.</p>
</body>
</html>
That looks much the same to me in Firefox, Safari, opera and Ie8 with a little fix for ie7 (ie6 would need the hover js to work as before).
Bookmarks