Home > Store

Sams Teach Yourself CSS in 24 Hours, 2nd Edition

Register your product to gain access to bonus material or receive a coupon.

Sams Teach Yourself CSS in 24 Hours, 2nd Edition

Premium Website

  • Sorry, this book is no longer in print.
Not for Sale


  • Copyright 2006
  • Edition: 2nd
  • Premium Website
  • ISBN-10: 0-672-32906-9
  • ISBN-13: 978-0-672-32906-7
  • eBook (Watermarked)
  • ISBN-10: 0-7686-6617-1
  • ISBN-13: 978-0-7686-6617-5

You know you should use cascading style sheets (CSS) to simplify your web pages, but how do you use CSS? Sams Teach Yourself CSS in 24 Hours, Second Edition is a carefully organized, well-written tutorial that teaches you not only how to use cascading style sheets, but also how to make smart decisions about how and when to apply CSS, based on browser support and intended effects. You'll cover standards compliant CSS, with an emphasis on providing both a theoretical understanding and practical experience at implementing CSS.   In 24 straightforward one-hour long lessons, you learn by accomplishing hands-on tasks that can be applied to your own site. The tutorials have been updated for this second edition to cover browsers that have become more widely used since the release of the first edition. It also has been updated to cover styling of forms, troubleshooting CSS, and other important new developments.


Source Code

Download source code files

Sample Content

Online Sample Chapters

Browser Support for CSS

The Bad Browser: What to Do When Browsers Fail to Play Nice With Your CSS

Downloadable Sample Chapter

Download the sample chapter

Table of Contents


Part I:              Introduction to CSS

Hour 1:            Understanding CSS

                              What Are Cascading Style Sheets?

                              The Origin of Cascading Style Sheets

                              CSS in Web Design

                              Browser Support



Hour 2:            Getting Started with CSS

                              Creating a Style Sheet

                              Writing CSS Rules

                              Linking a Style Sheet to an HTML Page

                              Viewing Your Style Sheet



Hour 3:            Browser Support for CSS

                              The Browser Problem

                              Modern Browsers and CSS



Hour 4:            Using CSS with HTML

                              Types of HTML

                              Style Sheets in HTML

                              Classes and IDs



Part II:             Core Principles of CSS

Hour 5:            Selectors

                              Simple Selectors

                              Combining Simple Selectors

                              Pseudo-Classes and Pseudo-Elements



Hour 6:            The CSS Box Model

                              Displaying Content in CSS

                              Understanding the Box Model

                              Box Display Properties



Hour 7:            Cascading and Inheritance

                              How the Cascade Works

                              User-Defined Style Sheets

                              Importing CSS




Hour 8:            Advanced Selectors

                              Attribute Selectors



Part III:           Styling Text with CSS

Hour 9:            Fonts and Font Families

                              Specifying Font Properties

                              Font Families



Hour 10:           Text Colors and Effects

                              Text Colors

                              Special Text Effects

                              Controlling Text Spacing



Hour 11:           Backgrounds and Background Colors

                              Setting Background Color

                              Using Background Images



Hour 12:           Styling Links

                              CSS for Link Styling

                              Common Link-Styling Techniques



Hour 13:           Lists

                              List Formatting



Hour 14:           Forms

                              Styling Form Controls

                              Browser Support for Form Styles



Part IV:             Layout with CSS

Hour 15:           Alignment

                              Aligning and Indenting Text

                              Floating Content



Hour 16:           Borders and Boxes

                              Adjusting Boxes

                              Displaying Boxes



Hour 17:           Styling Tables

                              Table Formatting

                              Applying Other Styles to Tables



Hour 18:           Box Sizing and Offset

                              Sizing Content

                              Content Overflow



Hour 19:           Absolute and Fixed Positioning

                              Positioning Content

                              Absolute Positioning

                              Layered Content

                              Fixed Positioning



Hour 20:           Page Layout in CSS

                              Laying Out the Page



Part V:              Mastering CSS

Hour 21:           Web Design with CSS

                              Basic Principles of Web Design

                              The Role of CSS in Web Design

                              Alternate Style Sheets



Hour 22:           Accessibility and Print Media

                              What Is Accessibility?

                              Aural Cascading Style Sheets

                              Media-Specific Style Sheets

                              CSS Properties for the print Medium



Hour 23:           User Interface and Generated Content

                              User Interface Properties

                              Creating Content



Hour 24:           Troubleshooting and Browser Hacks

                              Troubleshooting Style Sheets

                              Browser Hacks

                              Proprietary CSS



Part VI:             Appendixes

Appendix A:            Replacing Presentational HTML with CSS

Appendix B:            Glossary

Part VII:            Bonus Content

Bonus Hour 1:   CSS and JavaScript

                              What Is JavaScript?

                              Using JavaScript with CSS


Bonus Hour 2:   CSS and XML

                              What Is XML?

                              Displaying XML

                              XML-based Languages and CSS



Submit Errata

More Information

Unlimited one-month access with your purchase
Free Safari Membership