![]() |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Home --- Topics --- Articles --- Offers --- Register --- Contact us | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Did you know? if you register at Hamid School you can save up to 45% on hosting packages offered by Surreyhost.com . Don't miss out, every minute counts! Are you Confused? Click here to learn how to use hamid school CSS Pseudo classesSyntaxThe syntax of pseudo-classes:
CSS classes can also be used with pseudo-classes:
Anchor Pseudo-classesA link that is active, visited, unvisited, or when you mouse over a link can all be displayed in different ways in a CSS-supporting browser:
Note: a:hover MUST come after a:link and a:visited in the CSS definition in order to be effective!! Note: a:active MUST come after a:hover in the CSS definition in order to be effective!! Note: Pseudo-class names are not case-sensitive. Pseudo-classes and CSS ClassesPseudo-classes can be combined with CSS classes:
If the link in the example above has been visited, it will be displayed in red. CSS2 - The :first-child Pseudo-classThe :first-child pseudo-class matches a specified element that is the first child of another element. Note: For :first-child to work in IE. A <!DOCTYPE> must be declared. Match the first <p> elementIn the following example, the selector matches any <p> element that is the first child of any element:
Match the first <em> element in all <p> elementsIn the following example, the selector matches any <em> element that is the first child of a <p> element:
Match all <em> elements in all first child <p> elementsIn the following example, the selector matches any <em> elements in <p> elements that are the first child of another element:
CSS2 - The :lang Pseudo-classThe :lang pseudo-class allows you to define special rules for different languages. In the example below, the :lang class defines the type of quotation marks for q elements with a lang attribute with a value of "no":
Pseudo-classesBrowser support: IE: Internet Explorer, F: Firefox, N: Netscape. W3C: The number in the "W3C" column indicates in which CSS recommendation the property is defined (CSS1 or CSS2).
Viewed:427 Original Author: W3school however, some changes have been made to the main contents.
Did you know? if you register at Hamid School you can learn web programming and designing for free and also you can save up to 45% on hosting packages offered by Surreyhost.com . Don't miss out, every minute counts!
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Sponsored by: Surreyhost.com Coded and designed by: Hamid Moudi HPLA Follow us: ![]() ![]() |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||