I have site, black with white text on menu and white with black text on the main area. I want the hover, links etc to not change but I can't seem to get the css right. I create A.menuitems.hover etc which work on the menu but also on the main area even though there is a a.hover.
What am I doing wrong?a:hoveryou must follow the LoVe/HAte rule;
a:link
a:visited
a:hover
a:activeEveryone always forgets focus, what does everyone have against focus???a:link
a:visited
a:focus
a:hover
a:activeI'd recommend applying an ID to your menu, then using a selector more like this:#menu a, #menu a:link, #menu a:visited{
/* Your Styles Here */
}
#menu a:focus, #menu a:hover, #menu a:active{
/* Some More Here */
}IE seems to have difficulty when it comes to psuedo-classes and classes in the same term of a selector, I'm not sure if it was just IE5 or if it's IE6 aswell. In any case I prefer to just avoid the problem altogether by referencing the links in a slightly different way.Everyone always forgets focus, what does everyone have against focus???
Maybe it's because of the lack of support... MSIE's fault
I'm not sure if it was just IE5 or if it's IE6 aswell
Yep, both of them have problems, Infact even 7 has problemsIE supports focus on links, has done since IE4, and all the other browsers support it too.Everyone always forgets focus, what does everyone have against focus???Perhaps because he CSS2 specification contains the following example:A:link { color: red } /* unvisited links */
A:visited { color: blue } /* visited links */
A:hover { color: yellow } /* user hovers */
A:active { color: lime } /* active links */Yeah, but then right after it on the same page:a:focus { background: yellow }
a:focus:hover { background: white }There's enough of a break between the two examples that the effect is that the first example sticks in the mind by itself, methinks.That LoVe/HAte thing doesn't exactly help matters either.IE supports focus on links, has done since IE4, and all the other browsers support it too.
There are numerous bugs in which the :active state causes the :focus state to be ignored,
IE also has "rough" support for non-anchor elementsBut we're not talking about non-anchor elements. Do you have a link to any articles about the :active causing :focus to be ignored? Sounds like a very perculiar bug.Google Says:
<!-- m --><a class="postlink" href="http://www.satzansatz.de/cssd/pseudocss.html#active-and-focusHeh">http://www.satzansatz.de/cssd/pseudocss ... d-focusHeh</a><!-- m -->, how odd, but it would seem that it's not a problem if focus and active are used in the same selector. However, even if IE ignores it, other browsers don't and it's still a useful property for users who tab to links.
What am I doing wrong?a:hoveryou must follow the LoVe/HAte rule;
a:link
a:visited
a:hover
a:activeEveryone always forgets focus, what does everyone have against focus???a:link
a:visited
a:focus
a:hover
a:activeI'd recommend applying an ID to your menu, then using a selector more like this:#menu a, #menu a:link, #menu a:visited{
/* Your Styles Here */
}
#menu a:focus, #menu a:hover, #menu a:active{
/* Some More Here */
}IE seems to have difficulty when it comes to psuedo-classes and classes in the same term of a selector, I'm not sure if it was just IE5 or if it's IE6 aswell. In any case I prefer to just avoid the problem altogether by referencing the links in a slightly different way.Everyone always forgets focus, what does everyone have against focus???
Maybe it's because of the lack of support... MSIE's fault
I'm not sure if it was just IE5 or if it's IE6 aswell
Yep, both of them have problems, Infact even 7 has problemsIE supports focus on links, has done since IE4, and all the other browsers support it too.Everyone always forgets focus, what does everyone have against focus???Perhaps because he CSS2 specification contains the following example:A:link { color: red } /* unvisited links */
A:visited { color: blue } /* visited links */
A:hover { color: yellow } /* user hovers */
A:active { color: lime } /* active links */Yeah, but then right after it on the same page:a:focus { background: yellow }
a:focus:hover { background: white }There's enough of a break between the two examples that the effect is that the first example sticks in the mind by itself, methinks.That LoVe/HAte thing doesn't exactly help matters either.IE supports focus on links, has done since IE4, and all the other browsers support it too.
There are numerous bugs in which the :active state causes the :focus state to be ignored,
IE also has "rough" support for non-anchor elementsBut we're not talking about non-anchor elements. Do you have a link to any articles about the :active causing :focus to be ignored? Sounds like a very perculiar bug.Google Says:
<!-- m --><a class="postlink" href="http://www.satzansatz.de/cssd/pseudocss.html#active-and-focusHeh">http://www.satzansatz.de/cssd/pseudocss ... d-focusHeh</a><!-- m -->, how odd, but it would seem that it's not a problem if focus and active are used in the same selector. However, even if IE ignores it, other browsers don't and it's still a useful property for users who tab to links.