Style-Sheets
  Home arrow Style-Sheets arrow Page 2 - Understanding Style Sheets (part 2)
Dev Shed Forums 
Administration  
Apache  
BrainDump  
DHTML  
Flash  
Java  
JavaScript  
Multimedia  
MySQL  
Oracle  
Perl  
PHP  
Practices  
Python  
Reviews  
Security  
Style-Sheets  
Web Services  
XML  
Zend  
Zope  
Forums Sitemap 
IBM® developerWorks 
Dedicated Servers 
E-Commerce Hosting 
Linux Web Hosting 
Managed Hosting 
Small Business Hosting 
Download TestComplete 
VPS Hosting 
Weekly Newsletter

 
Developer Updates  
Free Website Content 
OLM
 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

Understanding Style Sheets (part 2)
By: icarus, (c) Melonfire
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 4 stars4 stars4 stars4 stars4 stars / 24
    2000-10-04

    Table of Contents:
  • Understanding Style Sheets (part 2)
  • Bringing Out The Decorations
  • Gimme My Space!
  • Reclining Every Which Way
  • Above The Watermark
  • Going Shopping
  • The View From The Top
  • The Z-Factor

  • 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

    Virtual Tradeshows by Ziff Davis Enterprise - A Unique Opportunity to Connect with IT Experts, Access Information, and Gain Insight on today's Technology

    Understanding Style Sheets (part 2) - Bringing Out The Decorations
    (Page 2 of 8 )

    In addition to the numerous font properties discussed in the first part of this series, CSS also allows you tremendous control over the spacing, alignment and appearance of your text.

    The "text-decoration" property allows you to emphasize text by putting a line under, over and through it. Take a look:
    <HTML>
    <HEAD>
    <STYLE TYPE="text/css">
    .question {text-decoration: underline} 
    /* display a line under text */
    .answer {text-decoration: overline} /* display 
    a line over text */
    .repeat {text-decoration: line-through} /* display a line 
    through text */
    .no-imagination {text-decoration: blink; font-weight: bolder} 
    /* blink text
    */
    </STYLE>
    </HEAD>
    <BODY>
    <P CLASS="question">
    Q. 
    How many psychoanalysts does it take to change a light bulb?
    <P CLASS="answer">
    A. 
    How many do you think it takes?
    <P CLASS="repeat">
    Q. How many psychoanalysts 
    does it take to change a light bulb?
    <P CLASS="repeat">
    A. How many do you 
    think it takes?
    <P CLASS="no-imagination">
    Why are you repeating jokes, you 
    unimaginative creep?
    </BODY>
    </HTML>
    
    Note that the "blink" keyword only works in Netscape Navigator. One of the most common uses of the "text-decorate" property is to underline links when the mouse pointer moves over them, in combination with the A:hover pseudo-class (you remember pseudo-classes, don't you?). Here's how:
    <HTML>
    <HEAD>
    <STYLE TYPE="text/css">
    A {text-decoration: none}
    A:hover 
    {text-decoration: underline}
    </STYLE>
    </HEAD>
    <BODY>
    <A HREF="#">This 
    is a link</A>. Hooray!
    </BODY>
    </HTML>
    

    More Style-Sheets Articles
    More By icarus, (c) Melonfire


     

       

    STYLE-SHEETS ARTICLES

    - What is CSS?
    - The Power of CSS
    - Understanding Style Sheets (part 2)
    - Understanding Style Sheets (Part 1)

     
    Accelerating Trading Partner Performance
     
    Competing on Analytics
     
    Cost Effective Scaling with Virtualization and Coyote Point Systems
     
    Five Checkpoints to Implementing IP Telephony
     
    Hosted Email Security: Staying Ahead of New Threats
     




    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway