I followed the solution for a HTML approach for a tooltip. My current sample code looks like:
<!DOCTYPE html>
<html>
<head>
<title>Page Title</title>
<style>
sup.footnote::after {
content: attr(data-count);
}
sup.footnote:hover {
cursor: help;
position: relative;
}
sup.footnote cite {
display: none;
}
sup.footnote:hover cite {
display: inline-block;
position: absolute;
top: 0px;
left: -50%;
width: 250px;
background: #f0f0f0 no-repeat 100% 5%;
border: #c0c0c0 1px dotted;
border-radius: 8px;
margin: 10px;
padding: 8px;
}
</style>
</head>
<body>
<p>
Dies ist ein Beispiel für eine Fußnote in HTML
<sup class="footnote" data-count="1">
<cite>
<span> [Sample span]</span> with some explanation:
<a lang="en" href="http://test.gv.at/test.pdf">
http://test.gv.at/test/test/abde4/iabcde/009909asdf/vandsfk23/verylong/gghhy.pdf
</a>
</cite>
</sup>
</p>
</body>
</html>
The problem that I'm facing is that I don't know how to restrict the anchor
element with length. While FF breaks the anchor
nicely Chrome has troubles to do so.
I found solutions like setting display
for anchor but Chrome doesn't perform any kind of change. Perhaps I did it on the wrong elements or with the wrong style.
==> Is there a way to limit the length of the anchor
to e.g. 250px
?