HAPPY BOOKSGIVING
Use code BOOKSGIVING during checkout to save 40%-55% on books and eBooks. Shop now.
Register your product to gain access to bonus material or receive a coupon.
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.
Seven Common CSS Mistakes and How to Avoid Them
Ten Tips for Optimizing a Web Page for Search Engines
The Bad Browser: What to Do When Browsers Fail to Play Nice With Your CSS
Introduction
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
Summary
Workshop
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
Summary
Workshop
Hour 3: Browser Support for CSS
The Browser Problem
Modern Browsers and CSS
Summary
Workshop
Hour 4: Using CSS with HTML
Types of HTML
Style Sheets in HTML
Classes and IDs
Summary
Workshop
Part II: Core Principles of CSS
Hour 5: Selectors
Simple Selectors
Combining Simple Selectors
Pseudo-Classes and Pseudo-Elements
Summary
Workshop
Hour 6: The CSS Box Model
Displaying Content in CSS
Understanding the Box Model
Box Display Properties
Summary
Workshop
Hour 7: Cascading and Inheritance
How the Cascade Works
User-Defined Style Sheets
Importing CSS
Inheritance
Summary
Workshop
Hour 8: Advanced Selectors
Attribute Selectors
Summary
Workshop
Part III: Styling Text with CSS
Hour 9: Fonts and Font Families
Specifying Font Properties
Font Families
Summary
Workshop
Hour 10: Text Colors and Effects
Text Colors
Special Text Effects
Controlling Text Spacing
Summary
Workshop
Hour 11: Backgrounds and Background Colors
Setting Background Color
Using Background Images
Summary
Workshop
Hour 12: Styling Links
CSS for Link Styling
Common Link-Styling Techniques
Summary
Workshop
Hour 13: Lists
List Formatting
Summary
Workshop
Hour 14: Forms
Styling Form Controls
Browser Support for Form Styles
Summary
Workshop
Part IV: Layout with CSS
Hour 15: Alignment
Aligning and Indenting Text
Floating Content
Summary
Workshop
Hour 16: Borders and Boxes
Adjusting Boxes
Displaying Boxes
Summary
Workshop
Hour 17: Styling Tables
Table Formatting
Applying Other Styles to Tables
Summary
Workshop
Hour 18: Box Sizing and Offset
Sizing Content
Content Overflow
Summary
Workshop
Hour 19: Absolute and Fixed Positioning
Positioning Content
Absolute Positioning
Layered Content
Fixed Positioning
Summary
Workshop
Hour 20: Page Layout in CSS
Laying Out the Page
Summary
Workshop
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
Summary
Workshop
Hour 22: Accessibility and Print Media
What Is Accessibility?
Aural Cascading Style Sheets
Media-Specific Style Sheets
CSS Properties for the print Medium
Summary
Workshop
Hour 23: User Interface and Generated Content
User Interface Properties
Creating Content
Summary
Workshop
Hour 24: Troubleshooting and Browser Hacks
Troubleshooting Style Sheets
Browser Hacks
Proprietary CSS
Summary
Workshop
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
Summary
Bonus Hour 2: CSS and XML
What Is XML?
Displaying XML
XML-based Languages and CSS
Summary