Obsession

Watching
You're Beautiful
Liar Game 2
Autumn's Concerto

Playing
World of Warcraft

WOW Character
Nick: Wishix
Lv: 80
Race: Blood Elf
Class: Priest
Guild: Intoxicated
Server: Thaurissan

Nick:Wishie
Lv: 80
Race: Undead
Class: Dark Knight
Guild: Singabombz
Server: Thaurissan


-- Evirruka
-- Pandalene

Apply?

Links





:: CSS INTERMEDIATE TUTORIAL ::



Pseudo Classes

Pseudo classes are bolted on to selectors to specify a state or relation to the selector. They take the form of selector:pseudo class { property: value; }, simply with a colon in between the selector and the pseudo class.

Many CSS proposals are not supported by all browsers, but there are four pseudo classes that can be used safely when applied to links.

  • link is for an unvisited link.
  • visited is for a link to a page that has already been visited.
  • active is for a link when it is gains focus (for example, when it is clicked on).
  • hover is for a link when the cursor is held over it.
a.snowman:link {
	color: blue;
}

a.snowman:visited {
	color: purple;
}

a.snowman:active {
	color: red;
}

a.snowman:hover {
	text-decoration: none;
	color: blue;
	background-color: yellow;
}
Although CSS gives you control to bypass it, maintaining different colours for visited links is good practice as many users still expect this. As pseudo classes (other than hover) are not often used, this is a feature that is unfortunately not as common as it once was. Because of this, it is less important than it used to be, but if you are looking for the optimum user response, then you should use it.

Traditionally, text links were blue if not visited and purple if visited, and there is still reason to believe that these are the most effective colours to use, although, again, with the increasingly widespread use of CSS, this is becoming less commonplace and the average user no longer assumes that links must be blue or purple.


You should also be able to use the hover pseudo class with elements other than links. Unfortunately, Internet Explorer doesn't support this method. This is a bloody irritation because there are lots of nice little tricks you can do that look delightful in other browsers.