Styling Links
Links can be styled with any CSS property (e.g. color, font-family, background, etc.).
Special for links are that they can be styled differently depending on what state they are in.
The four links states are:
- a:link - a normal, unvisited link
- a:visited - a link the user has visited
- a:hover - a link when the user mouses over it
- a:active - a link the moment it is clicked
Example
a:link {color:#FF0000;} /* unvisited link */
a:visited {color:#00FF00;} /* visited link */
a:hover {color:#FF00FF;} /* mouse over link */
a:active {color:#0000FF;} /* selected link */
a:visited {color:#00FF00;} /* visited link */
a:hover {color:#FF00FF;} /* mouse over link */
a:active {color:#0000FF;} /* selected link */
When setting the style for several link states, there are some order rules:
- a:hover MUST come after a:link and a:visited
- a:active MUST come after a:hover
- Other Topics
CSS : List,CSS : Background color,CSS : Styling links,CSS : Text decoration,CSS : Font properties,CSS : Font size,CSS : Font style,CSS : Font families,CSS : Text properties,CSS : Relative positioning,CSS : Padding properties,CSS : Padding-shorthand property,CSS : Padding - individual sides,CSS : Cross browser compatibality,CSS : Left and right Aligning by float property,CSS : Left &Amp; Right Aligning By Position Property,CSS : The lang pseudo class,CSS : MEDIA,CSS::STYLING FORMS, mechanical Engineering, English books,Photoshop tutorials,Harry potter,Best 100 english books,Mechanical-old-question-paper,
No comments:
Post a Comment