Style Sheets
  Home arrow Style Sheets arrow Page 3 - CSS: Pseudo
Dev Articles Forums 
ADO.NET  
Apache  
ASP  
ASP.NET  
C#  
C++  
ColdFusion  
COM/COM+  
Delphi-Kylix  
Design Usability  
Development Cycles  
DHTML  
Embedded Tools  
Flash  
Graphic Design  
HTML  
IIS  
Interviews  
Java  
JavaScript  
MySQL  
Oracle  
Photoshop  
PHP  
Reviews  
Ruby-on-Rails  
SQL  
SQL Server  
Style Sheets  
VB.Net  
Visual Basic  
Web Authoring  
Web Services  
Web Standards  
XML  
Mobile Linux 
App Generation ROI 
IBM® developerWorks 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
STYLE SHEETS

CSS: Pseudo
By: James Payne
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 3 stars3 stars3 stars3 stars3 stars / 3
    2008-05-19

    Table of Contents:
  • CSS: Pseudo
  • Dealing with the :first Line Pseudo Element
  • Pseudo Classes
  • A Preview of Mouse-over Effects

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT


    CSS: Pseudo - Pseudo Classes


    (Page 3 of 4 )

    As we said before, pseudo-classes allow you to soup up those selectors. Here, in our first example, we will work with hyperlinks:


    <html>

    <head>

    <style type="text/css">

    a:link {color: red}

    a:visited {color: purple}

    a:hover {color: #0000FF}

    a:active {color: orange}

    </style>

    </head>

    <body>

    <p><b><a href="http://www.devshed.com" target="_blank">Visit Developer Shed today!</a></b></p>

    </body>

    </html>

    You can change your hyperlink in other ways like so:


    <html>

    <head>

    <style type="text/css">

    a.first:link {color: purple}

    a.first:visited {font-size: 200%}

    a.first:hover {background: yellow; font-size: 90%; font-family: Impact}

    a.second:link {color: #ff0000}

    a.second:visited {color: orange}

    a.second:hover {color: red; text-decoration: underline overline; font-size: 150%}

    </style>

    </head>

    <body>

    <p><b><a class="first" href="http://www.aspfree.com" target="_blank">Click here to visit ASP FREE!</a></b></p>

    <p><b><a class="second" href="http://www.seochat.com" target="_blank">Click here to visit SEO CHAT!</a></b></p>

    </body>

    </html>

    There are other pseudo classes, such as the :first child and the :lang, but we will skip those for now (look for an explanation of them in my upcoming XHTML tutorial).

    More Style Sheets Articles
    More By James Payne


       · would have liked to comment, but keep it to myself now, as i dont like the attribute...
     

    STYLE SHEETS ARTICLES

    - Image Replacement CSS Techniques
    - Using BlueTrip`s Success, Notice and Error C...
    - More Uses for the Thin and Caps CSS Classes ...
    - Styling Definition Lists with the BlueTrip C...
    - Styling Unordered and Ordered HTML Lists wit...
    - Using the BlueTrip CSS Framework`s Thin and ...
    - Adding Borders to Web Page Columns with Blue...
    - Introducing the BlueTrip CSS Framework
    - Using a Background Grid to Assist Web Page L...
    - Extending the Rule Of Thirds for Web Page La...
    - A Two-Column Web Page Layout Based on the Ru...
    - Using the Rule Of Thirds for Web Page Layout
    - Swapping Columns Using the Divine Ratio for ...
    - Using the Golden Ratio in Liquid Web Page De...
    - Fundamental Design Principles for Web Page L...







    © 2003-2009 by Developer Shed. All rights reserved. DS Cluster 2 Hosted by Hostway
    For more Enterprise Application Development news, visit eWeek