[pmwiki-users] Fwd: [pmwiki-devel] ZAP cookbook, www.zapsite.org

JB jbit at bitlink.com
Fri Dec 8 00:02:46 CST 2006


 > a:link, #side a, #top a {
 > 	color: #3399ff;
 > }
 > a:active, #side a:active, #top a:active {
 > 	color: #cc99ff;
 > }
 > a:visited, #side a:visited, #top a:visited {
 > 	color: #999999;
 > }
 > a:hover, #side a:hover, #top a:hover {
 > 	color: #009900;
 > 	text-decoration: underline;
 > }
------------------------------------

I thought links had to be in a specific order.

Below I have arranged the code differently:

a:link, #side a, #top a {
	color: #3399ff;
}
a:visited, #side a:visited, #top a:visited {
	color: #999999;
}
a:hover, #side a:hover, #top a:hover {
	color: #009900;
	text-decoration: underline;
}
a:active, #side a:active, #top a:active {
	color: #cc99ff;
}
------------------------------------
 From a web page somewhere:

Specify link styles in the right order

When applying CSS to the different states of a link you need
to think about the order of the rules. In most cases you’ll
want to specify them in the order :link :visited :hover :active.
Take the initial letter for each state and you get “LVHA”, which
can be expanded to “LoVe HAte” or something else that is easy to
remember. The order is affected by specificity, and is explained
well by Eric Meyer in Link Specificity.







More information about the pmwiki-users mailing list