Book description
Cascading Style Sheets (CSS) are a powerful way to enrich the presentation of HTML-based web pages, allowing web authors to give their pages a more sophisticated look and more structure. CSS's compact file size helps web pages load quickly, and by allowing changes made in one place to be applied across the entire document, CSS can save hours of tedious changing and updating. But to leverage the full power of CSS, web authors first have to sift through CSS theory to find practical solutions that resolve real-world problems. Web authors can waste hours and earn ulcers trying to find answers to those all-too-common dilemmas that crop up with each project. The CSS Cookbook cuts straight through the theory to provide hundreds of useful examples and CSS code recipes that web authors can use immediately to format their web pages. The time saved by a single one of these recipes will make its cover price money well-spent. But the CSS Cookbook provides more than quick code solutions to pressing problems. The explanation that accompanies each recipe enables readers to customize the formatting for their specific purposes, and shows why the solution works, so you can adapt these techniques to other situations. Recipes range from the basics that every web author needs to code concoctions that will take your web pages to new levels. Reflecting CSS2, the latest specification, and including topics that range from basic web typography and page layout to techniques for formatting lists, forms, and tables, it is easy to see why the CSS Cookbook is regarded as an excellent companion to Cascading Style Sheets: The Definitive Guide and a must-have resource for any web author who has even considered using CSS.
Table of contents
-
CSS Cookbook
- Foreword
- Preface
-
1. Web Typography
- Introduction
- 1.1. Specifying Fonts and Inheritance
- 1.2. Specifying Font Measurements and Sizes
- 1.3. Enforcing Font Sizes
- 1.4. Setting a Simple Initial Cap
- 1.5. Setting a Larger, Centered Initial Cap
- 1.6. Setting an Initial Cap with Decoration (Imagery)
- 1.7. Creating a Heading with Stylized Text
- 1.8. Creating a Heading with Stylized Text and Borders
- 1.9. Stylizing a Heading with Text and an Image
- 1.10. Creating a Pull Quote with HTML Text
- 1.11. Creating a Pull Quote with Borders
- 1.12. Creating a Pull Quote with Images
- 1.13. Setting the Indent in the First Line of a Paragraph
- 1.14. Setting the Indent of Entire Paragraphs
- 1.15. Setting Text to Be Justified
- 1.16. Styling the First Line of a Paragraph
- 1.17. Styling the First Line of a Paragraph with an Image
- 1.18. Creating a Highlighted Text Effect
- 1.19. Changing Line Spacing
-
2. Page Elements
- Introduction
- 2.1. Eliminating Page Margins
- 2.2. Coloring the Scrollbar
- 2.3. Centering Elements on a Web Page
- 2.4. Setting a Background Image
- 2.5. Creating a Line of Background Images
- 2.6. Placing a Background Image
- 2.7. Fixing the Background Image
- 2.8. Placing a Page Border
- 2.9. Customizing a Horizontal Rule
- 2.10. Example Design: Setting Up a Dynamic Splash Page
-
3. Links and Navigation
- Introduction
- 3.1. Removing Underlines from Links
- 3.2. Setting Text to Blink
- 3.3. Setting Style Decorations Other Than Underlines
- 3.4. Changing Cursors
- 3.5. Creating Rollovers Without JavaScript
- 3.6. Creating Nongraphical Menus with Rollovers
- 3.7. Creating Collapsible Menus
- 3.8. Building Horizontal Menus
- 3.9. Creating Breadcrumb Navigation
- 3.10. Creating Image-Based Rollovers
- 3.11. Designing a Dynamic Visual Menu
- 3.12. Creating Contextual Menus
- 4. Lists
-
5. Forms
- Introduction
- 5.1. Setting Styles for Input Elements
- 5.2. Setting Styles for textarea Elements
- 5.3. Setting Styles for Select and Option Elements
- 5.4. Creating Form Buttons
- 5.5. Setting Up a Submit-Once-Only Button
- 5.6. Designing a Web Form Without Tables
- 5.7. Sample Design: A Login Form
- 5.8. Sample Design: A Registration Form
- 6. Tables
-
7. Page Layouts
- Introduction
- 7.1. Developing Hybrid Layouts Using HTML Tables and CSS
- 7.2. Building a One-Column Layout
- 7.3. Building a Two-Column Layout
- 7.4. Building a Two-Column Layout with Fixed-Width Columns
- 7.5. Creating a Flexible Multicolumn Layout with Floats
- 7.6. Creating a Fixed-Width Multicolumn Layout with Floats
- 7.7. Creating a Flexible Multicolumn Layout with Positioning
- 7.8. Creating a Fixed-Width Multicolumn Layout with Positioning
- 7.9. Designing an Asymmetric Layout
- 8. Print
-
9. Hacks and Workarounds
- Introduction
- 9.1. Hiding Certain Styles from Netscape Navigator 4.x
- 9.2. Delivering Alternative Values to Internet Explorer 5.x for Windows
- 9.3. Removing Web Page Flicker in Internet Explorer 5.x for Windows
- 9.4. Keeping Background Images Stationary in Internet Explorer 6 for Windows
- 9.5. Keeping CSS Rules from Internet Explorer 5 for Macintosh
-
10. Designing with CSS
- Introduction
- 10.1. Enlarging Text Excessively
- 10.2. Creating Unexpected Incongruity
- 10.3. Combining Unlike Elements to Create Contrast
- 10.4. Leading the Eye with Contrast
- 10.5. Building a Panoramic Image Presentation
- 10.6. Combining Different Image Formats
- 10.7. Making Word Balloons
- 10.8. Emphasizing a Quotation
- 10.9. Placing a Drop Shadow Behind an Image
- A. Resources
- Index
- Colophon
Product information
- Title: CSS Cookbook
- Author(s):
- Release date: August 2004
- Publisher(s): O'Reilly Media, Inc.
- ISBN: 9780596005764
You might also like
book
HTML5 Cookbook
With scores of practical recipes you can use in your projects right away, this cookbook helps …
book
CSS Master
CSS Master is tailor-made for the web designer who's really serious about taking their skills to …
book
Architecting CSS: The Programmer’s Guide to Effective Style Sheets
Leverage various CSS features in combination with popular architectures in order to bring your style sheets …
book
CSS Secrets
In this practical guide, CSS expert Lea Verou provides 47 undocumented techniques and tips to help …