By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,705 Members | 2,013 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,705 IT Pros & Developers. It's quick & easy.

a:hover action not working in MSIE

P: n/a
I'm trying to use the hover pseudo-attribute to display footnotes in
documentation. The footnotetext is hidden until you hover over the
footnotemark. This work well in Safari and Firefox, but I can't seem
to get it to work in MSIE. Is this even possible in MSIE? If so, can
you explain why this CSS doesn't work?
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<style type="text/css">
<!--
a.footnote .footnotemark {
color: #ff8000;
}
a.footnote:hover .footnotemark {
cursor: help;
}
a.footnote .footnotetext {
display: none;
}
a.footnote:hover .footnotetext {
display: block;
position: absolute;
bottom: 0em;
left: 0em;
background-color: #F8F8CB;
color: #000;
text-align: left;
border: 7px #ff8000 solid;
padding: 10px;
margin: 0px;
z-index: 20;
}
-->
</style>
<body>

<p>The following data<a class="footnote"><sup
class="footnotemark">**</sup><span class="footnotetext"> These data
have been compiled from the United Nations Demographic Yearbook 1990
(United Nations publications, Sales No. E/F.91.XII.1, copyright 1991,
United Nations, New York) and are reproduced with the permission of the
United Nations.</span></a> from Rouncefield (1995) are the birth rates,
death rates, and infant death rates for 97 countries. The following
statements create the SAS data set <span class="hv">Poverty</span>.</p>

</body>
</html>

Jan 11 '06 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Kevin Smith <Ke*********@sas.com> wrote:
I'm trying to use the hover pseudo-attribute to display footnotes in
documentation. The footnotetext is hidden until you hover over the
footnotemark. This work well in Safari and Firefox, but I can't seem
to get it to work in MSIE.


MSIE supports :hover for links only, i.e. for <a> elements with an href
attribute. Besides, it seems that even if you make your <a> elements links,
MSIE doesn't interpret selectors like
a.footnote:hover .footnotetext
properly.

I'd suggest a different approach to footnotes: make them endnotes, and make
the endnote references real links. See
http://www.cs.tut.fi/~jkorpela/www/fn.html

--
Yucca, http://www.cs.tut.fi/~jkorpela/
Jan 11 '06 #2

P: n/a
Kevin Smith wrote:
I'm trying to use the hover pseudo-attribute to display footnotes in
documentation. The footnotetext is hidden until you hover over the
footnotemark. This work well in Safari and Firefox, but I can't seem
to get it to work in MSIE. Is this even possible in MSIE? If so, can
you explain why this CSS doesn't work?

As Jukka pointed out it does not work because of IE's very limited
:hover implementation and it is only half-assed for <a>.
You can get the function you want, somewhat, in a way, vaguely, by
changing
a.footnote .footnotemark { color: #ff8000; }
to
a.footnote sup { color: #ff8000; }

and add the required "href" attribute to the link. "Name" will not do.
Even so, while the footnote appears doing the above, it does not
disappear. :-(

--
jmm (hyphen) list (at) sohnen-moe (dot) com
(Remove .AXSPAMGN for email)
Jan 11 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.