I have little experience with CSS so this might be a very simple problem.
I have a table of contents on my web page with links like this:
<a href="#user-interface">User interface</a>
and somewhere else I have a bookmark like like this:
<a name="user-interface">User Interface</a>
Besides that I have a CSS file with the following style:
a:hover
{
color:#D090D0;
background:#803080;
text-decoration:none;
}
The goal is to change the color and background color of the link when I move the cursor over the link, and that is working perfectly. But the problem is that the bookmarks are also changing style when I move the mouse pinter over them. It makes sense to me since both the link and the bookmark use the <a> tag but i cannot figure out how to distinguish both on the CSS. I know I could use a class for the link but I wonder if there is a better way.
<a name="...">is deprecated.Instead, you should just put an
id="..."on any element.To answer the question, add
:link.