Learn More

Monday, September 12, 2011

Styling Links

css logo
One of the basics of creating a navigation menu is the css links. Such as changing the color or font (perhaps also the background) when we move the mouse over a link. Basically the style offered by the css there are two types of links, first to distinguish between links that have not been visited by a previously visited. The second is to change the rendering in response to user action.

Differentiating with unvisited

There are two syntax is used, the following syntax:

to know is, a:link is valid for unvisited links. Meanwhile, a:visited applies for links that have been visited.

Changing the rendering

Same as before, this technique also involves two syntax

As a: hover applies while the user is designate the element (with some pointing device), but not activate it. And to enable it we using a: active.

There should also note, a: hover MUST come after a: link and a: visited, and a: active MUST come after a: hover. See the example below

Post a Comment