a:hover does not work without href attribute in <a> ?
- From: "Gabriel Lozano-Morán" <gabriel.lozano@xxxxxxxxxxx>
- Date: Wed, 13 Apr 2005 13:26:53 +0200
Is there a reason why this does NOT work in IE6.0 ?
<html>
<head>
<style type="text/css">
a
{
text-decoration: none;
}
a:hover
{
text-decoration: underline;
}
</style>
</head>
<body>
<a>Some text</a>
</body>
</html>
It only works when I add the href attribute:
<a href="">Some text</a>
I have already read that the <a> HTML tag is the only tag in IE that
supports the hover. I have created a treeview and all my <a> tags look like
this:
<div>
<a onClick="toggle(this)">Node 1</a>
</div>
In my toggle function I will set the style of the <div> to either
display:none or display:visible, that works. I need to hover of the <a> tag
so that whenever I move my mouse over Node 1 the background color changes.
How can I achieve this?
I am trying to create something similar like the treeview you can find at
http://msdn.microsoft.com/library/default.asp or does anybody know how the
deeptree.css looks like?
TIA
Gabriel Lozano-Morán
.
- Follow-Ups:
- RE: a:hover does not work without href attribute in <a> ?
- From: Graham Underwood
- Re: a:hover does not work without href attribute in <a> ?
- From: Gabriel Lozano-Morán
- RE: a:hover does not work without href attribute in <a> ?
- Prev by Date: Re: IIS setup, rights.
- Next by Date: Re: how to compile asp.net and c#
- Previous by thread: what is needed on the webserver
- Next by thread: Re: a:hover does not work without href attribute in <a> ?
- Index(es):
Relevant Pages
|
Loading