untitled

(John Hannent) #1

Table of Contents xvii



  • Introduction ................................................................

  • Part I: The ABCs of CSS .............................................

  • Chapter 1: CSS Fulfills a Promise ...................................................................................

  • Chapter 2: Getting Results with CSS ............................................................................

  • Chapter 3: Up and Running with Selectors ..................................................................

  • Part II: Looking Good with CSS ...................................

  • Chapter 4: Taking a Position ..........................................................................................

  • Chapter 5: All About Text ..............................................................................................

  • Chapter 6: Managing Details in Style Sheets ..............................................................

  • Chapter 7: Styling It Your Way .....................................................................................

  • with CSS ................................................................. Part III: Adding Artistry: Design and Composition

  • Chapter 8: Web Design Basics ......................................................................................

  • Chapter 9: Spacing Out with Boxes .............................................................................

  • Chapter 10: Organizing Your Web Pages Visually ....................................................

  • Chapter 11: Designing with Auto and Inline Elements ..............................................

    • (And Doing Away with Tables) .................................................................................. Chapter 12: Handling Tables and Lists



  • Chapter 13: Creating Dramatic Visual Effects ............................................................

  • Part IV: Advanced CSS Techniques ............................

  • Chapter 14: Specializing in Selection ..........................................................................

  • Chapter 15: CSS Moves into the Future ......................................................................

  • Chapter 16: Programmatic CSS ....................................................................................

  • Chapter 17: Testing and Debugging ............................................................................

  • Part V: The Part of Tens ...........................................

  • Chapter 18: Ten Great CSS Tips and Tricks ................................................................

    • (But Are Important) .................................................................................................... Chapter 19: Ten Topics That Don’t Fit Elsewhere in the Book



  • Index .......................................................................

  • Introduction ..................................................................

    • Creating Compelling Designs .........................................................................

    • Separating Content from Style .......................................................................

    • Benefiting from the Cascade ..........................................................................

    • The End of the Browser Wars ........................................................................

    • Who Should Read This Book .........................................................................

      • and developers alike ......................................................................... For designers, would-be designers, programmers,

      • Making do in a shaky economy ...........................................................



    • Plain, Clear English .........................................................................................

    • How to Use This Book ....................................................................................

    • Foolish Assumptions ......................................................................................

    • How This Book Is Organized ..........................................................................

      • Part I: The ABCs of CSS .........................................................................

      • Part II: Looking Good with CSS ............................................................

      • Part III: Adding Artistry: Design and Composition with CSS ............

      • Part IV: Advanced CSS Techniques ...................................................

      • Part V: The Part of Tens ......................................................................



    • Conventions Used in This Book ..................................................................

      • Special symbols ...................................................................................

      • Avoid typos: find all the code online ................................................

      • What you need to get started ............................................................

      • Icons used in this book .......................................................................





  • Part I: The ABCs of CSS ..............................................

    • Chapter 1: CSS Fulfills a Promise.

      • Improving HTML ...........................................................................................

      • Getting Efficient with CSS .............................................................................

        • Changing Web design for the better .................................................

        • Being ready for anything ....................................................................



      • Designers Want to Design ............................................................................

      • Where CSS Fits with the Tools You Already Use .......................................

      • Getting Practical ............................................................................................

        • Look for CSS features in your current software ..............................

        • Resources on the Web ........................................................................



      • Avoiding Browser Compatibility Problems ................................................

      • Getting Dramatic with Filters .......................................................................



    • Chapter 2: Getting Results with CSS.

      • Starting from Scratch ....................................................................................

      • Selectors and Such: CSS Syntax ...................................................................

        • Properties refer to attributes .............................................................

        • Grouping ...............................................................................................



      • Showing Some Class .....................................................................................

      • Specifying All-Purpose Properties ..............................................................

      • Using an ID Selector ......................................................................................

        • Specifying more than one class .........................................................

        • Capitalizing on case-sensitivity .........................................................

        • Just stay in lowercase .........................................................................



      • When Styles Cascade ....................................................................................

        • Visualizing specificity .........................................................................

        • Understanding CSS specificity ...........................................................



      • Grasping Inheritance ....................................................................................



    • Chapter 3: Up and Running with Selectors.

      • Working with Universal Selectors ...............................................................

      • Using Multiple Declarations .........................................................................

      • Using Attributes as Selectors ......................................................................

      • The Simplest Attribute Selector ..................................................................

        • Matching attribute selection types ...................................................

        • Matching partial attribute values ......................................................

        • Matching exact attribute values ........................................................



      • Building Your First Style Sheet ....................................................................

        • Transforming a Word document into a Web page ...........................

        • Visualizing levels of specificity ..........................................................



      • Creating an External Cascading Style Sheet ..............................................

        • The importance of !Important ...........................................................

        • The importance of being closest .......................................................

        • Omit semicolons ..................................................................................

        • Everything must be important ..........................................................



      • Adding New Selectors ...................................................................................

      • When Cascades Collide ................................................................................





  • Part II: Looking Good with CSS ...................................

    • Chapter 4: Taking a Position.

      • Relativity Explained ......................................................................................

      • Flow Versus Positioning, Floating Versus Coordinates ............................

      • Controlling Layout with Offsetting .............................................................

      • Moving Deeper into Positioning ..................................................................

      • Stacking Elements on Top of Each Other with the Z-Axis ........................

      • Combining Stacking with Translucence .....................................................





  • Chapter 5: All About Text.

    • Thinking About User Interfaces ..................................................................

    • Substituting Fonts .........................................................................................

    • Types of Type ................................................................................................

      • Avoiding monospace ...........................................................................

      • Using system styles .............................................................................



    • All Roads Lead to Rome ...............................................................................

      • Simplicity above all .............................................................................

      • When you’re not too picky about typeface .....................................



    • Using Font Variants .......................................................................................

    • Specifying Font Weight .................................................................................

    • Using the Font-Variant for Small Caps ........................................................

    • Simple Font-Style ...........................................................................................

    • Choosing the Right Typeface Size ...............................................................

      • Specifying relative sizes ......................................................................

      • Controlling font size with greater precision ....................................



    • Specifying Absolute Measured Sizes ..........................................................

    • Font: The All-Purpose Property .................................................................

    • Adjusting Line Height .................................................................................

    • Decorating Text with Underlining and Strikethrough ............................

    • Transforming Text with Capitalization .....................................................

    • Shading with Drop-Shadowing ...................................................................



  • Chapter 6: Managing Details in Style Sheets.

    • Specifying Size and Position ......................................................................

      • Measuring length ...............................................................................

      • Understanding little em ....................................................................



    • Figuring the Percentages ............................................................................

    • Adding a Bit of Color ...................................................................................

      • Creating special paragraph styles ...................................................

      • Calculating color ...............................................................................

      • Using the color list ............................................................................

      • Coloring borders ...............................................................................

      • Using inset border colors .................................................................

      • Where does light come from? ..........................................................



    • Coloring the Background ...........................................................................



  • Chapter 7: Styling It Your Way.

    • Kerning for Better Headlines .....................................................................

      • True kerning .......................................................................................

      • Ultra kerning ......................................................................................



    • Vertical Tightening ......................................................................................

      • Adjusting percentages ......................................................................

      • Understanding baselines ..................................................................



    • CSS3 Introduces Kerning Mode .................................................................

      • Word spacing ...............................................................................................

      • Aligning Text ................................................................................................

        • Vertical aligning .................................................................................

        • Using descriptive values ..................................................................

        • Aligning by percentages ...................................................................



      • Horizontal Alignment ..................................................................................

      • Indenting Text ..............................................................................................

      • Texturing ......................................................................................................

      • Setting Individual Background Properties ...............................................

        • No background inheritance ..............................................................

        • Special repeats ...................................................................................



      • Background Positioning .............................................................................





  • Composition with CSS ............................................... Part III: Adding Artistry: Design and

    • Chapter 8: Web Design Basics.

      • Organizing with White Space .....................................................................

        • Take a second look ............................................................................

        • Getting on balance ............................................................................



      • Emphasizing an Object with Silhouetting ................................................

      • Adding Drop Caps .......................................................................................

      • Trapping White Space ................................................................................

      • Following the Rule of Thirds ......................................................................

        • The four hot spots .............................................................................

        • Background image positioning ........................................................



      • Keeping It Appropriate ...............................................................................



    • Chapter 9: Spacing Out with Boxes.

      • Getting a Grip on Boxes ..............................................................................

        • Adding a border .................................................................................

        • Adding padding .................................................................................

        • Adding a margin .................................................................................



      • Vertical Positioning .....................................................................................

      • Horizontal Positioning ................................................................................

      • Breaking Up Text with Horizontal Lines ...................................................



    • Chapter 10: Organizing Your Web Pages Visually.

      • Managing Borders .......................................................................................

        • Specifying a simple border ...............................................................

        • Choosing from lotsa border styles ..................................................

        • Mixing and matching styles .............................................................

        • Specifying border width ...................................................................

        • Coloring a border ..............................................................................



      • Floating About .............................................................................................

      • Canceling a Float with Clear ......................................................................



    • Chapter 11: Designing with Auto and Inline Elements.

      • Employing Auto to Control Layout ...........................................................

        • Specifying margins ............................................................................

        • Centering ............................................................................................

        • Using !DOCTYPE to force IE to comply ...........................................



      • Vertical Positioning with Auto ...................................................................

      • Handling Inline Elements ............................................................................



    • Away with Tables). Chapter 12: Handling Tables and Lists (And Doing

      • List Styles O’ Plenty ....................................................................................

        • Getting exotic with the list-style-image property ..........................

        • Positioning lists .................................................................................

        • Putting it all together ........................................................................



      • Managing Tables ..........................................................................................

        • Stalking invisible .gifs ........................................................................

        • Employing the table-layout property .............................................

        • Avoiding properties not supported by IE .......................................



      • Doing Without Tables .................................................................................

        • Positioning where you will ...............................................................

        • Placing content willy-nilly ................................................................

        • Loving your layout a little too much ...............................................



      • Creating Columns that Resize with the Browser .....................................

      • Building Fixed Columns ..............................................................................



    • Chapter 13: Creating Dramatic Visual Effects.

      • Impressing with Static Filters ...................................................................

      • Dazzling with Transition Filters ................................................................

      • Fading Between Images ..............................................................................

      • Transitions between Pages ........................................................................





  • Part IV: Advanced CSS Techniques ............................

    • Chapter 14: Specializing in Selection.

      • Getting Specific with Inheritance ..............................................................

        • Grasping tree structure ....................................................................

        • Parents versus ancestors .................................................................

        • When a root sits above the tree ......................................................

        • The shaky tree ...................................................................................



      • Offspring Inheriting .....................................................................................



    • Contextual Selectors ...................................................................................

      • Selecting by context rather than grouping ....................................

      • Descending deeper ............................................................................

      • Styling distant descendants .............................................................



    • Thwarting Descendant Selectors ..............................................................

    • Selectors Using Attributes .........................................................................



  • Chapter 15: CSS Moves into the Future.

    • Getting to Know CSS3 .................................................................................

      • Working with Mozilla-supported CSS3 features .............................

      • Setting opacity ...................................................................................



    • Discovering False Pseudo-Classes ............................................................

      • Hyperlink formatting with pseudo-classes ....................................

      • Hovering with pseudo-classes .........................................................

      • Adding your own class name to a pseudo-class ............................

      • Selecting first children ......................................................................



    • Employing Fake Pseudo-Elements ............................................................

      • Creating quick drop caps with first-letter ......................................

      • Using the first-line element for special lines of text ......................



    • The Future of Pseudo .................................................................................

      • Enabling, disabling ............................................................................

      • Checking radio buttons and check boxes ......................................



    • Figuring Out Dubious Descendant Selectors ...........................................



  • Chapter 16: Programmatic CSS.

    • Extending CSS with Scripting .....................................................................

    • Executing Scripts Automatically upon Loading ......................................

    • Using the Right Tools for the Job ..............................................................

    • Modifying CSS Styles through Programming ...........................................

      • Changing styles ..................................................................................

      • Changing the rules ............................................................................



    • Timing Things Right ....................................................................................

      • Grasping countdown timers ............................................................

      • Employing metronome timers .........................................................





  • Chapter 17: Testing and Debugging.

    • Checking Punctuation .................................................................................

    • Validating Your Work ..................................................................................

    • Ignoring Fringe Browsers ...........................................................................

      • Going back in time .............................................................................

      • What if you must consider compatibility? .....................................

      • Checking compatibility charts .........................................................

      • Sniffing browsers ...............................................................................

      • Forcing users to upgrade ..................................................................

      • Trying Out the W3C Validator ...................................................................

        • Hoping for helpful error messages ..................................................

        • Identifying property value problems ..............................................



      • Validating HTML ..........................................................................................

        • Meeting some requirements ............................................................

        • Finding a better bug trap ..................................................................



      • Debugging Script .........................................................................................





  • Part V: The Part of Tens ............................................

    • Chapter 18: Ten Great CSS Tips and Tricks.

      • Letting Users Control Font Size .................................................................

      • Making Sure Your Borders Show Up .........................................................

      • Watching Out for Color Clash ....................................................................

      • Centering for Everyone ..............................................................................

      • Timing Blurring and Other Effects ............................................................

      • Debugging Script .........................................................................................

      • Finding a List Apart (Get It?) .....................................................................

      • Using Your Own Bullets in Lists ................................................................

      • Specifying Graphics Locations ..................................................................

      • Combining Classes ......................................................................................

      • Aunt Mildred’s Glazed Carrots ..................................................................



    • (But Are Important). Chapter 19: Ten Topics That Don’t Fit Elsewhere in the Book

      • Keeping Current via the Internet ...............................................................

      • Upgrading HTML Web Pages to CSS .........................................................

      • Finding Good Tutorials and Reference Information ...............................

      • Remembering Inheritance ..........................................................................

      • The SelectORacle: Getting Explanations About Complicated Rules ....

      • Providing Alternatives ................................................................................

      • Letting the User Decide ..............................................................................

      • Exploring Visual Studio ..............................................................................

      • Rediscovering Columns ..............................................................................

      • Playing with Positions ................................................................................





  • Index ........................................................................

Free download pdf