Beginning CSS3

Book description

Beginning CSS3 teaches you how to style web pages using Cascading Style Sheets (CSS)—the language of web design. Starting from first principles, you'll learn through a series of practical exercises how to change the default look of HTML tags, adding color, backgrounds, and borders. The book demystifies core concepts, such as the CSS box model and selectors, giving you the confidence and knowledge to create innovative and flexible page layouts. You'll also learn how to create rounded corners, drop shadows, and gradients without the need for images, using the latest CSS3 techniques.

What you'll learn

  • Teaches how to style attractive and flexible web pages

  • Hands-on exercises demonstrate how to combine style rules for different effects

  • Comprehensive coverage of CSS2.1 and stable parts of CSS3

  • Who this book is for

    Beginning CSS3 is aimed at web designers who want to master the use of Cascading Style Sheets to style and lay out modern web pages. It teaches core concepts, such as the CSS box model and choosing the most appropriate selectors to apply styles efficiently. This makes it an excellent choice for both complete beginners and web designers who want to improve their understanding of CSS.

    Table of contents

    1. Title
    2. Contents at a Glance
    3. Contents
    4. About the Author
    5. About the Technical Reviewer
    6. Acknowledgments
    7. Introduction
    8. Part I: CSS Basics
      1. Chapter 1: Introducing CSS.the Language of Web Design
        1. A Short History of CSS
        2. So, How Do I Use CSS?
        3. Learning to Write CSS Well
        4. Summary
      2. Chapter 2: Using Basic Selectors
        1. How Selectors Work
        2. Deciding Which Selector to Use
        3. Trying It Out
        4. What Happens When Style Rules Conflict?
        5. Summary
      3. Chapter 3: Specifying Sizes, Colors, and Files
        1. Specifying Size and Other Units of Measurement
        2. Setting Color Values
        3. Specifying Background Images and Other Files
        4. Summary
    9. Part II: Working with Text
      1. Chapter 4: Styling Text
        1. Selecting and Adjusting Fonts
        2. Changing the Color of Text
        3. Formatting Text
        4. Summary
      2. Chapter 5: Embedding Web Fonts
        1. Adding Web Fonts to Your Sites
        2. Choosing the Right Font Formats
        3. Checking the License
        4. Embedding Fonts with @font-face
        5. Adjusting Relative Font Sizes
        6. Summary
    10. Part III: CSS Page Layout
      1. Chapter 6: Understanding the CSS Box Model
        1. Introducing the Components of the Box Model
        2. Using Margins to Improve Page Layout
        3. Changing Layout with the display Property
        4. Controlling Visibility
        5. Handling Content That’s Too Big
        6. Summary
      2. Chapter 7: Floating Elements for Layout
        1. How to Float an Element
        2. Summary
      3. Chapter 8: Adding Backgrounds
        1. Controlling Backgrounds with CSS
        2. Using Background Images
        3. Using the background Shorthand Property
        4. Adding Multiple Background Images to an Element
        5. Summary
      4. Chapter 9: Adding Borders and Drop Shadows
        1. Creating Basic Borders
        2. Adding Rounded Corners and Drop Shadows Without Images
        3. Using Border Images
        4. Styling Outlines
        5. Summary
      5. Chapter 10: Styling Lists and Navigation Menus
        1. Styling Unordered and Ordered Lists
        2. Creating a Navigation Bar from a List
        3. Using CSS Sprites in a Navigation Bar
        4. Summary
      6. Chapter 11: Positioning Elements Precisely
        1. How Does CSS Positioning Work?
        2. Fixing Elements Inside the Browser Window
        3. Using Relative Positioning
        4. Using Absolute Positioning
        5. Setting the Stacking Order with z-index
        6. Using CSS Positioning for Tooltips and Menus
        7. Masking an Absolutely Positioned Element
        8. Summary
      7. Chapter 12: Cross-Browser Layout Techniques
        1. What Size Browser Window Should I Design For?
        2. Creating a Single-column Layout
        3. Using Floats for a Two-column Layout
        4. Using Floats for a Three-column Layout
        5. Using CSS Table Display for Layout
        6. Improving Accessibility with a “Skip to Main Content” Link
        7. Summary
    11. Part IV: Advanced CSS Techniques
      1. Chapter 13: Using Advanced Selectors
        1. Selecting First, Last, and Only Instances
        2. Selecting Elements Based on their Position in a Series
        3. Selecting Elements Based on Their Relationship with Another
        4. Selecting Form Elements Based on Their State
        5. Selecting Elements Based on Negative Factors
        6. Other Selectors
        7. Summary
      2. Chapter 14: Styling Tables
        1. Basic Table Structure
        2. Styling Tables with CSS
        3. Summary
      3. Chapter 15: Generated Content
        1. Inserting Generated Content
        2. Creating Fun Visual Effects with Generated Content
        3. Summary
      4. Chapter 16: Creating a Print Style Sheet
        1. What’s Different About Print CSS?
        2. Specifying the Media Type
        3. Setting Page Margins
        4. Controlling Where to Break Content
        5. Creating Styles for Printing
        6. Summary
      5. Chapter 17: Targeting Styles with Media Queries
        1. Creating Responsive Web Designs
        2. How Media Queries Work
        3. Normalizing Width Values for Mobile Devices
        4. Dealing with Images
        5. Case Study: Responsive Layout
        6. Summary
      6. Chapter 18: Using CSS3 Multi-Column Layout
        1. Browser Support for Multi-Column Layout
        2. How Columns Are Laid Out
        3. Setting the Width and Number of Columns
        4. Setting the Gap and Rule Between Columns
        5. Spanning, Filling, and Breaking Columns
        6. Summary
      7. Chapter 19: Creating Gradients Without Images
        1. CSS Gradient Basics
        2. Creating Linear Gradients
        3. Creating Radial Gradients
        4. Creating Repeating Gradients
        5. Using Multiple Gradients
        6. Supporting Older Browsers
        7. Summary
      8. Chapter 20: 2D Transforms and Transitions
        1. Browser Support for 2D Transforms and Transitions
        2. Using 2D Transforms
        3. Animating Property Values with CSS Transitions
        4. Using CSS Transitions with Images
        5. Summary
      9. Chapter 21: Animating with CSS Keyframes
        1. Browser Support for CSS Animations
        2. Defining Keyframes
        3. Animating Elements with Keyframes
        4. Summary
      10. Chapter 22: What Next?
        1. Flexible Box Layout
        2. Other Features to Look Forward To
        3. Summary
    12. Index

    Product information

    • Title: Beginning CSS3
    • Author(s):
    • Release date: September 2012
    • Publisher(s): Apress
    • ISBN: 9781430244738