Style Sheets
  Home arrow Style Sheets arrow Page 2 - Learn CSS, Selectors
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 
Sun Developer Network 
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

Learn CSS, Selectors
By: Michael Youssef
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 4 stars4 stars4 stars4 stars4 stars / 19
    2005-06-06

    Table of Contents:
  • Learn CSS, Selectors
  • The Universal Selector
  • The Class Selector
  • The ID Selector

  • 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


    Learn CSS, Selectors - The Universal Selector


    (Page 2 of 4 )

    CSS supports a selector called the universal selector (and it's supported by almost all the browsers), which you can use to apply certain styling properties to each and every element in the document. That's why it's called universal, because it applies the styling properties to all of the elements in the Web page. You need to understand inheritance and cascade to understand how to use the universal selector; I will discuss these concepts a little later in the series. 

    Let's look at an example of how to use the universal selector. Replace the above CSS code with the following, and reload the Web page.

    *
    {
      font-size: .9em;
      font-family: Arial, Tahoma;
      color: blue;
    }

    As you have guessed, the asterisk symbol is the universal selector. Here we are saying that we want all of the elements in the referencing web page to have a font-size of 90 percent of the default font size, a font-family of Arial with an alternative font of Tahoma and blue text. Here's the resulting Web page.

    More Style Sheets Articles
    More By Michael Youssef


       · At last, someone who describes the process in plain and simple English. I am so...
     

    STYLE SHEETS ARTICLES

    - Improving the Visual Presentation of a CSS D...
    - Fixing Browser Incompatibilities in a CSS Dr...
    - Building Clean Drop-Down Menus with CSS
    - Creating Hybrid Web Page Layouts with Negati...
    - Creating Three-Column Web Page Layous with N...
    - Swapping Column Positions in Web Page Layout...
    - Creating Web Page Layouts with Negative Marg...
    - Creating Gradients for Individual Containers...
    - Creating Gradients for Web Page Headers with...
    - SEO Scrolling Frames Problem Solved
    - Building Cross-Browser Background Effects wi...
    - CSS: Pseudo
    - Using PNG Images to Build Background Effects
    - CSS: Continuing the Clarification of CSS Cla...
    - CSS: Top Secret Classification






    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway
    Stay green...Green IT