Cascading Style Sheets (CSS) by Example

Book description

Cascading Style Sheets (CSS) by Example allows you to learn the fundamentals of CSS by taking you through small, gradual steps. It provides examples using CSS in "real world" scenarios. Cascading Style Sheets (CSS) by Example follows a logical, linear teaching style that will ultimately have you using CSS to utilize more control over the appearance and styling of Web pages.

Table of contents

  1. Copyright
  2. About the Author
  3. Acknowledgments
  4. Tell Us What You Think!
  5. Introduction
  6. Creating Your First Style Sheet
    1. Getting Oriented
      1. What Is a Style Sheet?
      2. Implementation of CSS in Browsers
      3. CSS and HTML
      4. Downloading and Extracting the Example Files
      5. Using a Text Editor to Work with the Examples
      6. What's Next?
    2. Setting Your Page's Base Styles
      1. Checking Which Browser You're Using
      2. Using This Chapter's Example File
      3. A Quick Word About Using the Example File
      4. Controlling the Body of Your Page
      5. Setting the P Rule for Paragraphs
      6. What's Next?
    3. Setting Your Page's Other Styles
      1. Using the Example File
      2. Setting the H1 Rule
      3. Using a Group Selector to Set the Other Heading Characteristics
      4. Setting the List Characteristics
      5. Setting the Address Characteristics
      6. What's Next?
  7. Understanding Basic Concepts
    1. Using CSS with HTML
      1. Containment in HTML
      2. Separating Appearance from Structure
      3. CSS and Deprecated Elements and Attributes
      4. A Word About Frames
      5. The Three Flavors of HTML
      6. What's Next?
    2. Cascading, Grouping, and Inheritance
      1. How Cascading Works
      2. How Grouping Works
      3. How Inheritance Works
      4. What's Next?
  8. Working with Colors, Fonts, and Text
    1. Working with Colors and Backgrounds
      1. Using the Example File
      2. Setting Foreground and Background Colors
      3. Setting Background Images
      4. Using the Background Shorthand Property
      5. What's Next?
    2. Working with Fonts
      1. Using the Example File
      2. Setting Font Sizes
      3. Setting Font Families
      4. Setting Font Weights
      5. Setting Font Styles and Variants
      6. Using the Font Stretch Property
      7. Using the Font Shorthand Property
      8. Font Matching and the @font-face At-Rule
      9. What's Next?
    3. Working with Text and Links
      1. Using the Example File
      2. Horizontally Aligning Text
      3. Indenting the First Text Line
      4. Controlling the Line Height
      5. Controlling Letter and Word Spacing
      6. Setting Underlining, Overlining, and Other Highlighting
      7. Controlling Capitalization
      8. Setting Text Shadows
      9. Using the SPAN Element
      10. Controlling the Appearance of Links
      11. What's Next?
  9. Working with Block Elements and Objects
    1. Formatting Block Elements
      1. Understanding the CSS Formatting Model
      2. Using the Example File
      3. Setting Margins
      4. Setting Padding
      5. Setting Borders
      6. Using the DIV Element
      7. Setting Padding, Borders, and Margins for Images and Other Objects
      8. What's Next?
    2. Aligning, Floating, and Positioning
      1. Horizontally Aligning Block Elements
      2. Floating Elements
      3. Creating an Online Picture Gallery
      4. Positioning Elements
      5. What's Next?
  10. Working with Lists and Tables
    1. Working with Lists
      1. Creating Bulleted Lists
      2. Creating Link Lists
      3. Creating Numbered Lists
      4. Creating Glossary Lists
      5. What's Next?
    2. Working with Tables
      1. Using the Example HTML File
      2. CSS and Tables
      3. Controlling Table Width and Horizontal Alignment
      4. Controlling Spacing, Padding, and Borders
      5. Aligning Table Cell Contents
      6. Working with Rows and Columns
      7. Putting On the Finishing Touches
      8. What's Next?
  11. Getting Deeper into Using Styles
    1. Creating Menus and Interfaces
      1. Using the Example HTML File
      2. Creating Interactive Menus
      3. Creating an Interactive Sidebar Menu
      4. Creating a Ribbon Menu
      5. What's Next?
    2. Creating Page Layouts and Site Designs
      1. Using the Example HTML Files
      2. Keeping It Simple
      3. Using a Fixed Sidebar Background
      4. Creating Multi-Column Layouts
      5. Creating a Three-Column Layout
      6. Creating Site Designs
      7. What's Next?
  12. Validation and Compatibility
    1. Validating Your Style Sheet
      1. Why Validate?
      2. Validation Options
      3. The W3C's CSS and HTML Validators
      4. Using the WDG's CSS and HTML Validators
      5. Using Other HTML Validators and Page Checkers
      6. What's Next?
    2. Providing for Backward Compatibility
      1. Using the Example File
      2. What About Non-Conforming Browsers?
      3. Using Gateway Pages and Browser Sniffers
      4. Participating in the Web Standards Project
      5. Using the LINK Element with a MEDIA Attribute
      6. Finding Out What Works (and Doesn't Work) in Which Browsers
      7. The Comment Bug
      8. A Practical Example
      9. Understanding How DocType Switching Works
      10. What's Next?
  13. Appendixes
    1. CSS Quick Reference
      1. Containment and Application in HTML
      2. CSS1 Properties (Alphabetical)
      3. A Look Ahead at CSS3
    2. Using CSS with Other Technologies
      1. Using JavaScript with CSS
      2. Creating Dynamic Styles with Dynamic HTML
      3. Using CSS with XML
    3. Overview of CSS Software Tools
      1. Style Sheet Editors
      2. CSS-Supporting HTML Editors and Web Publishing
      3. Text Editors
      4. Windows
      5. Macintosh
      6. Other Platforms
      7. Miscellaneous Utilities

Product information

  • Title: Cascading Style Sheets (CSS) by Example
  • Author(s): Steve Callihan
  • Release date: November 2001
  • Publisher(s): Que
  • ISBN: 0789726173