You are previewing Beginning CSS: Cascading Style Sheets for Web Design, Third Edition.
O'Reilly logo
Beginning CSS: Cascading Style Sheets for Web Design, Third Edition

Book Description

Completely updated material and new examples show you what CSS can do

With the latest versions of Firefox, Safari, Internet Explorer, and other browsers released, CSS is more essential than ever. This beginner guide demonstrates how cascading style sheets can be used to define styles to items in Web pages, rather than format each item individually. Each lesson in this full-color book has been methodically revised to be more concise and efficient, making your learning experience as productive as possible.

  • Covers the latest in CSS, including the new features of Internet Explorer, Firefox, Safari, and Google Chrome

  • Reviews the vast improvements to mobile browsers and how CSS can work with them

  • Provides helpful examples and walks you through real-world solutions to common hurdles

  • Discusses embedded fonts, compatibility tables, and cross-browser bug scenarios

Beginning CSS, Third Edition gets you completely up to date so that you can start using CSS in the newest Web and mobile browsers today!

Table of Contents

  1. BEGINNING CSS
  2. Cover Page
  3. Title Page
  4. Copyright
  5. Dedication
  6. ABOUT THE AUTHORS
  7. CREDITS
  8. Acknowledgments
  9. Contents
  10. INTRODUCTION
    1. WHAT'S NEW IN THE THIRD EDITION?
    2. WHO IS THIS BOOK FOR?
    3. WHAT DOES THIS BOOK COVER
    4. HOW THIS BOOK IS STRUCTURED
    5. What You Need to Use This Book
    6. CONVENTIONS
    7. SOURCE CODE
    8. ERRATA
    9. P2P.WROX.COM
  11. PART I: The Basics
    1. CHAPTER 1: Introducing Cascading Style Sheets
      1. ADVANTAGES OF USING CSS
      2. HOW TO WRITE CSS
      3. YOUR FIRST CSS-ENABLED DOCUMENT
      4. BROWSERS
    2. CHAPTER 2: The Bits that Make Up a Style Sheet
      1. RULES
      2. SELECTORS
      3. DECLARATIONS
      4. VALUES
      5. INCLUDING CSS IN A DOCUMENT
      6. THE IMPORTANCE OF GOOD HTML
    3. CHAPTER 3: Selectors
      1. CLASS AND ID SELECTORS
      2. CLASS SELECTORS
      3. THE UNIVERSAL SELECTOR
      4. DESCENDANT SELECTORS
      5. PSEUDO-CLASSES
    4. CHAPTER 4: The Cascade and Inheritance
      1. THE CASCADE
      2. INHERITANCE
  12. PART II: Properties
    1. CHAPTER 5: Applying Font Faces
      1. SETTING FONT FACES
      2. MAKING TEXT ITALIC, BOLD, OR SMALL CAPS
      3. THE FONT-SIZE PROPERTY
      4. THE FONT SHORTHAND PROPERTY
    2. CHAPTER 6: Manipulating the Display of Text
      1. LINE HEIGHT
      2. CONTROLLING THE SPACING BETWEEN LETTERS
      3. CONTROLLING THE SPACING BETWEEN WORDS
      4. INDENTING TEXT
      5. HORIZONTALLY ALIGNING TEXT
      6. DECORATING TEXT WITH UNDERLINES, OVERLINES, OR STRIKETHROUGH
      7. TRANSFORMING LETTER-CASE TO LOWERCASE OR UPPERCASE OR CAPITALIZING THE INITIAL CHARACTERS OF WORDS
      8. CONTROLLING HOW WHITE SPACE IS HANDLED
    3. CHAPTER 7: Background Colors and Images
      1. BACKGROUND COLORS
      2. BACKGROUND IMAGES
      3. CONTROLLING HOW BACKGROUND IMAGES REPEAT
      4. POSITIONING BACKGROUND IMAGES
      5. FIXING A BACKGROUND IMAGE IN PLACE
      6. BACKGROUND SHORTHAND
    4. CHAPTER 8: The Box Model: Controlling Margins, Borders, Padding, Width, and Height
      1. OVERVIEW
      2. MARGINS
      3. BORDERS
      4. PADDING
      5. SETTING DIMENSIONS
      6. OVERFLOWING CONTENT
    5. CHAPTER 9: Floating and Vertical Alignment
      1. FLOATING CONTENT
      2. CANCELING FLOATED CONTENT
      3. FLOAT BUGS IN IE 6
      4. VERTICALLY ALIGNING CONTENT
    6. CHAPTER 10: Styling Lists
      1. LIST MARKUP
      2. THE LIST-STYLE-TYPE PROPERTY
      3. THE LIST-STYLE-IMAGE PROPERTY
      4. THE LIST-STYLE-POSITION PROPERTY
      5. THE LIST-STYLE SHORTHAND PROPERTY
    7. CHAPTER 11: Positioning
      1. INTRODUCTION TO POSITIONING
      2. THE Z-AXIS AND THE Z-INDEX PROPERTY
    8. CHAPTER 12: Styling Tables
      1. OPTIONAL TABLE ELEMENTS
      2. TABLE CAPTIONS
      3. TABLE COLUMNS
      4. CONTROLLING TABLE LAYOUT
      5. COLLAPSING BORDERS
      6. CONTROLLING BORDER SPACING
    9. CHAPTER 13: Create a Complete Layout
      1. CREATING THE PAGE WITH HTML
      2. STYLING TEXT AND CUSTOM FONTS
      3. BUILDING THE LAYOUT
      4. GRADIENT BACKGROUNDS
  13. PART III: Advanced CSS and Alternative Media
    1. CHAPTER 14: Advanced Selectors
      1. DIRECT CHILD SELECTORS
      2. NEXT SIBLING SELECTOR
      3. ATTRIBUTE SELECTORS
      4. PSEUDO-ELEMENTS :FIRST-LETTER AND :FIRST-LINE
      5. STRUCTURAL PSEUDO-CLASSES
    2. CHAPTER 15: Styling for Print
      1. BENEFITS OF PRINT STYLE SHEETS
      2. APPLYING STYLES BASED ON MEDIA
      3. CONTROLLING STYLES FOR MEDIA WITHIN A STYLE SHEET
      4. CONTROLLING PAGE BREAKS
      5. THE CONTENT PROPERTY
    3. CHAPTER 16: Customizing the Mouse Cursor
      1. THE CURSOR PROPERTY
      2. CURSOR COMPATIBILITY
    4. CHAPTER 17: Controlling Opacity and Visibility
      1. THE OPACITY PROPERTY
      2. THE VISIBILITY PROPERTY
    5. CHAPTER 18: Styling Content for Mobile Devices
      1. WHY MOBILE IS IMPORTANT
      2. DEVELOPING FOR MOBILE
      3. TESTING MOBILE DEVICES
      4. MEDIA QUERIES
    6. CHAPTER 19: Closing Comments
      1. CSS SUMMARY
      2. FUTURE OF CSS
      3. CLOSING STATEMENT
  14. APPENDIX A: Answers to Exercises
    1. CHAPTER 1
    2. CHAPTER 2
    3. CHAPTER 3
    4. CHAPTER 4
    5. CHAPTER 5
    6. CHAPTER 6
    7. CHAPTER 7
    8. CHAPTER 8
    9. CHAPTER 9
    10. CHAPTER 10
    11. CHAPTER 11
    12. CHAPTER 12
    13. CHAPTER 13
    14. CHAPTER 14
    15. CHAPTER 15
    16. CHAPTER 16
    17. CHAPTER 17
    18. CHAPTER 18
  15. APPENDIX B: Additional CSS Resources
    1. TEXT EDITORS
    2. BROWSERS
    3. HTML
    4. CSS
  16. APPENDIX C: CSS Reference
    1. REFERENCE CONVENTIONS
    2. SELECTORS
    3. PSEUDO-CLASSES
    4. PSEUDO-ELEMENTS
    5. COLOR PROPERTIES
    6. FONT PROPERTIES
    7. BACKGROUND PROPERTIES
    8. TEXT PROPERTIES
    9. BOX MODEL PROPERTIES
    10. VISUAL EFFECTS
    11. POSITIONING
    12. TABLE PROPERTIES
    13. USER INTERFACE
    14. GENERATED CONTENT, AUTOMATIC NUMBERING, AND LISTS
  17. APPENDIX D: CSS Colors
    1. Reds
    2. Blues
    3. Greens
    4. Yellows
    5. Browns
    6. Grays
  18. Index