[css-d] Four that could be two
I see four total things here, but two are the same and the other two are the same, is there some way to merge these so there are only two blocks? a:visited.secondLinks { color: #FFF; text-decoration: none; } a:link.secondLinks { color: #FFF; text-decoration: none; } a:active.secondLinks { color: #FFF; text-decoration: underline; } a:hover.secondLinks { color: #FFF; text-decoration: underline; } -- - Scott HanedaTel: 415.898.2602 http://www.newgeo.com Novato, CA U.S.A. __ css-discuss [EMAIL PROTECTED] http://www.css-discuss.org/mailman/listinfo/css-d IE7b2 testing hub -- http://css-discuss.incutio.com/?page=IE7 List wiki/FAQ -- http://css-discuss.incutio.com/ Supported by evolt.org -- http://www.evolt.org/help_support_evolt/
Re: [css-d] Four that could be two
On 5/26/06, Scott Haneda [EMAIL PROTECTED] wrote: I see four total things here, but two are the same and the other two are the same, is there some way to merge these so there are only two blocks? a:visited.secondLinks { color: #FFF; text-decoration: none; } a:link.secondLinks { color: #FFF; text-decoration: none; } becoming this code: a.secondLinks, a.secondLinks:visited { color: #FFF; text-decoration: none; } a:active.secondLinks { color: #FFF; text-decoration: underline; } a:hover.secondLinks { color: #FFF; text-decoration: underline; } becoming this code: a.secondLinks:hover, a.secondLinks:active { color: #FFF; text-decoration: underline; } should do it. note that you need to specify the class (.secondLinks) before the state (:hover). ·skye· __ css-discuss [EMAIL PROTECTED] http://www.css-discuss.org/mailman/listinfo/css-d IE7b2 testing hub -- http://css-discuss.incutio.com/?page=IE7 List wiki/FAQ -- http://css-discuss.incutio.com/ Supported by evolt.org -- http://www.evolt.org/help_support_evolt/
Re: [css-d] Four that could be two
On 5/26/06, Scott Haneda [EMAIL PROTECTED] wrote: should do it. note that you need to specify the class (.secondLinks) before the state (:hover). Thanks, just what I needed no problem. also note that if your hover and active states are the same, only specifying rules for the hover state will be enough, as you have to be hovering over a link in order for it to be active. if, however, you want to do something different with the link, such as change it's color when you click on it, a seperate rule for the active state would be in order. ·skye· __ css-discuss [EMAIL PROTECTED] http://www.css-discuss.org/mailman/listinfo/css-d IE7b2 testing hub -- http://css-discuss.incutio.com/?page=IE7 List wiki/FAQ -- http://css-discuss.incutio.com/ Supported by evolt.org -- http://www.evolt.org/help_support_evolt/
Re: [css-d] Four that could be two
I think the active state is used if you keyboard navigate the links without activating them. The link that will be followed by pressing the space/enter key can be active without sharing the hover status. True, many people navigate solely with the mouse. As a general rule, I would suggest being extra explicit about your selectors and rules rather than relying on default behaviors. On Fri, 26 May 2006 15:20:32 -0700 skye estes [EMAIL PROTECTED] wrote: On 5/26/06, Scott Haneda [EMAIL PROTECTED] wrote: no problem. also note that if your hover and active states are the same, only specifying rules for the hover state will be enough, as you have to be hovering over a link in order for it to be active. __ css-discuss [EMAIL PROTECTED] http://www.css-discuss.org/mailman/listinfo/css-d IE7b2 testing hub -- http://css-discuss.incutio.com/?page=IE7 List wiki/FAQ -- http://css-discuss.incutio.com/ Supported by evolt.org -- http://www.evolt.org/help_support_evolt/