Programmers Den
« [CSS] Link Pseudo-Class Selectors »

Welcome Guest. Please Login or Register.
Nov 27, 2009, 11:28pm




Programmers Den :: The Internet Side :: Web Development :: Code Examples :: [CSS] Link Pseudo-Class Selectors
   [Search This Thread][Send Topic To Friend] [Print]
 AuthorTopic: [CSS] Link Pseudo-Class Selectors (Read 222 times)
Lord Otaku
Global Moderator
*****
member is offline

[avatar]

The Final Key


[homepage]

Joined: Aug 2007
Gender: Female
Posts: 366
Karma: 1
 [CSS] Link Pseudo-Class Selectors
« Thread Started on Apr 23, 2008, 8:34pm »

Level: Beginner

If you want to make your links a bit more dynamic on your web page, you can utilize a couple of psuedo-classes specifically for links.

THEY ARE:
:hover - links changes on mouse rollover
:visited - link changes when page it directs you to has been visited
:active - link changes on mouse click

So lets look at the code below (assume this is an external style):
Code:
:hover { color: yellow; }
:visited { color: red; }
:active { color: green; }


When this style sheet is included in my HTML page, my links will turn yellow when a mouse rolls over it, green as the mouse is being clicked, and red when the page the link directs you to has been visited.

Note: The visited effect may be a bit different depending on your browser.
Link to Post - Back to Top  IP: Logged

May you have the strength to fight the darkness within your heart...
   [Search This Thread][Send Topic To Friend] [Print]

Click Here To Make This Board Ad-Free


This Board Hosted For FREE By ProBoards
Get Your Own Free Message Boards & Free Forums!