Style-Sheets
  Home arrow Style-Sheets arrow Page 4 - Understanding Style Sheets (Part 1)
Dev Shed Forums  
Administration  
AJAX  
Apache  
BrainDump  
DHTML  
Flash  
Java  
JavaScript  
Multimedia  
MySQL  
Oracle  
Perl  
PHP  
Practices  
Python  
Reviews  
Security  
Smartphone Development  
Style-Sheets  
Web Services  
XML  
Zend  
Zope  
Mobile Linux  
App Generation ROI  
IBM® developerWorks  
Forums Sitemap  
E-Commerce Hosting  
Linux Web Hosting  
Managed Hosting  
Small Business Hosting  
VPS Hosting  
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

Understanding Style Sheets (Part 1)
By: icarus, (c) Melonfire
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: starstarstarstarstar / 32
    2000-09-27


    Table of Contents:
  • Understanding Style Sheets (Part 1)
  • Into The Light
  • More Pseudo-Gibberish
  • The Colour Of My Eyes
  • Playing With Type
  • Adding A Little Style

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      error-file:tidyout.log Del.ici.ous error-file:tidyout.log Digg
      error-file:tidyout.log Blink error-file:tidyout.log Simpy
      error-file:tidyout.log Google error-file:tidyout.log Spurl
      error-file:tidyout.log Y! MyWeb error-file:tidyout.log 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


    Understanding Style Sheets (Part 1) - The Colour Of My Eyes
    ( Page 4 of 6 )

    Now that all the theory's out of the way, how about actually getting down with some of the basic CSS properties available?First on the list
    is the "color" property. As you've seen in the examples above, this property controls the foreground colour of an HTML element, and comes in very handy when you need to change the colour of different blocks of text. The example below turns all italicized text blue.

    <HEAD>
    <STYLE TYPE="text/css">
    I {color: blue)
    </STYLE>
    </HEAD>

    CSS offers a number of different ways to specify the colour value here. The simplest is to use one of the sixteen pre-defined colour names available - aqua, black, blue, fuchsia, gray, green, lime, maroon, navy, olive, purple, red, silver, teal, white, and yellow. You can also specify a hexadecimal colour combination by prefixing it with a #I {color:#0000FF) or a combination of RGB values in absolute or percentage terms, like this:I {color: rgb (0, 0, 255))I {color: rgb (0%, 0%, 100%))Following close on the heels of "color" comes "background-color", which controls the background colour of an HTML element.

    <HTML>
    <HEAD>
    <STYLE TYPE="text/css">
    .blue {color: cyan; background-color: #FF8000}
    .green {color: lime; background-color: black}
    </STYLE>

    </HEAD>

    <BODY>

    <P CLASS="blue">
    Oooh...you have beautiful eyes!
    <P CLASS="green">
    I know. But you aren't too bad yourself.

    </BODY>
    </HTML>

    Keep looking at that combination, and you'll make some eye surgeon very, very rich!



     
     
    >>> 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)





    © 2003-2009 by Developer Shed. All rights reserved. DS Cluster 5 Hosted by Hostway
    Stay green...Green IT