My Account
View Cart
Home
Community
Books & Videos
Safari Books Online
Conferences
Training
School of Technology
About
Complete List
Bestsellers
New Releases
Rough Cuts
Upcoming Titles
Ebooks
By Publisher
By Series
Out of Print
Order Info
Search
Search Tips
Tell a friend
CSS Cookbook, Second Edition
By
Christopher Schmitt
October 2006
Pages: 538
|
Table of Contents
|
Index
|
Colophon
Table of Contents
Chapter 1
General
Introduction
Using CSS with HTML
Using Different Selectors to Apply Styles
Determining When to Use Class and ID Selectors
Understanding CSS Properties
Understanding the Box Model
Understanding DOCTYPES and Effects on Browser Layout
Associating Styles to a Web Page
How to Use Different Types of Style Sheets
Adding Comments Within CSS
Organizing the Contents of a Style Sheet
Organizing Style Sheet Files
Working with Shorthand Properties
Setting up an Alternate Style Sheet
Using Floats with Images
Using Absolute Positioning
Using Relative Positioning
Using CSS in Adobe Dreamweaver
Using CSS in Microsoft Expression Web Designer
Chapter 2
Web Typography
Introduction
Specifying Fonts
Specifying Font Measurements and Sizes
Gaining More Control over Font Sizes
Enforcing Font Sizes
Centering Text
Setting Text to Be Justified
Removing Space Between Headings and Paragraphs
Setting a Simple Initial Cap
Setting a Larger, Centered Initial Cap
Setting an Initial Cap with Decoration (Imagery)
Creating a Heading with Stylized Text
Creating a Heading with Stylized Text and Borders
Stylizing a Heading with Text and an Image
Creating a Pull Quote with HTML Text
Creating a Pull Quote with Borders
Creating a Pull Quote with Images
Setting the Indent in the First Line of a Paragraph
Setting the Indent of Entire Paragraphs
Creating a Hanging Indent
Styling the First Line of a Paragraph
Styling the First Line of a Paragraph with an Image
Creating a Highlighted Text Effect
Changing Line Spacing
Adding a Graphic Treatment to HTML Text
Placing Shadow Behind Text
Adjusting the Spacing Between Letters and Words
Chapter 3
Images
Introduction
Placing a Border Around an Image
Removing Borders Set on Images by Default in Some Browsers
Setting a Background Image
Creating a Line of Background Images
Placing a Background Image on a Web Page
Using Multiple Background Images on One Selector
Creating a Stationary Background Image
Overlaying HTML Text on an Image
Replacing HTML Text with an Image
Replacing HTML Text with Flash Text
Using Multiple PNGs with Transparency
Building a Panoramic Image Presentation
Combining Different Image Formats
Rounding Corners with Fixed-Width Columns
Rounding Corners (Sliding Doors Technique)
Rounding Corners (Mountaintop Technique)
Rounding Corners with JavaScript
Placing a Drop Shadow Behind an Image
Placing a Smooth Drop Shadow Behind an Image
Making Images Scalable
Making Word Balloons
Hindering People from Stealing Your Images
Inserting Reflections on Images Automatically
Using Image Sprites
Chapter 4
Page Elements
Introduction
Eliminating Page Margins
Coloring the Scrollbar
Techniques for Centering Elements on a Web Page
Placing a Page Border
Customizing a Horizontal Rule
Adding a Lightbox
Chapter 5
Lists
Introduction
Changing the Format of a List
Writing Cross-Browser Indentation in Lists
Place Dividers Between List Items
Creating Custom Text Markers for Lists
Creating Custom Image Markers for Lists
Inserting Large Custom Image Markers for Lists
Making a List Presentation Rich with Imagery
Creating Inline Lists
Making Hanging Indents in a List
Moving the Marker Inside the List
Chapter 6
Links and Navigation
Introduction
Removing Underlines from Links (and Adding Other Decorations)
Changing Link Colors
Changing Link Colors in Different Sections of a Page
Placing an Icon at the End of the Link
Changing Cursors
Creating Rollovers Without JavaScript
Creating Text Navigation Menus and Rollovers
Building Horizontal Navigation Menus
Building a Navigation Menu with Access Keys
Creating Breadcrumb Navigation
Creating Image-Based Rollovers
Creating Collapsible Menus
Creating Contextual Menus
Making Tool Tips with the Title Attribute
Designing a Dynamic Visual Menu
Apply Styles Dynamically to a Web Page
Chapter 7
Forms
Introduction
Modifying the Spacing Around a Form
Setting Styles for Input Elements
Applying Different Styles to Different Input Elements in the Same Form
Setting Styles for textarea Elements
Setting Styles for Select and Option Elements
Creating a Macintosh-Styled Search Field
Styling Form Buttons
Creating an Image Submit Button
Setting Up a Submit-Once-Only Button
Creating a Submit Button That Looks Like HTML Text
Making an HTML Text Link Operate Like a Submit Button
Designing a Web Form Without Tables
Designing a Two Column Form Without Tables
Highlighting Form Fields
Integrating Form Feedback with a Form
Styling Access Keys in Web Forms
Grouping Common Form Elements
Entering Data into a Form Like a Spreadsheet
Sample Design: A Login Form
Sample Design: A Registration Form
Chapter 8
Tables
Introduction
Setting the Cell Spacing
Setting the Borders and Cell Padding
Setting the Style for Caption
Setting the Styles Within Table Cells
Setting Styles for Table Header Elements
Removing Gaps from Images Placed in Table Cells
Eliminating Gaps Between Table Cells
Creating Alternating Background Colors in Table Rows
Adding a Highlighting Effect on a Table Row
Sample Design: An Elegant Calendar
Chapter 9
Page Layouts
Introduction
Building a One-Column Layout
Building a Two-Column Layout
Building a Two-Column Layout with Fixed-Width Columns
Creating a Flexible Multicolumn Layout with Floats
Creating a Fixed-Width Multicolumn Layout with Floats
Creating a Flexible Multicolumn Layout with Positioning
Creating a Fixed-Width Multicolumn Layout with Positioning
Using Floats to Display Columns in Any Order
Designing an Asymmetric Layout
Chapter 10
Print
Introduction
Creating a Printer-Friendly Page
Making a Web Form Print-Ready
Displaying URIs After Links
Inserting Special Characters Before Links
Sample Design: A Printer-Friendly Page with CSS
Chapter 11
Hacks, Workarounds, and Troubleshooting
Introduction
Isolating Styles for Netscape Navigator 4.x
Delivering Specific Styles to Internet Explorer 5.x for Windows
Removing Web Page Flicker in Internet Explorer 5.x for Windows
Keeping Background Images Stationary in Internet Explorer 6 for Windows
Using Internet Explorer for Windows’ Conditional Comments to Deliver Styles
Keeping CSS Rules from Internet Explorer 5 for Macintosh
Setting Up an Intelligent Hack Management System
Diagnosing CSS Bugs and Browser Issues
Testing a Site Design on More Than One Platform with Only One Computer
Installing More Than One Version of Internet Explorer for Windows on a Computer
Testing a Web Site with a Text Browser
Chapter 12
Designing with CSS
Introduction
Enlarging Text Excessively
Creating Unexpected Incongruity
Combining Unlike Elements to Create Contrast
Leading the Eye with Contrast
Checking for Enough Color Contrast
Emphasizing a Quotation
Appendix A
Resources
General HTML and CSS Instruction
Design Resources
Discussion Groups
References
Tools
Appendix B
CSS 2.1 Properties and Proprietary Extensions
Appendix C
CSS 2.1 Selectors, Pseudo-Classes, and Pseudo-Elements
Appendix D
Styling of Form Elements
Checkboxes
File Input
Radio Buttons
Text Fields
Multiple Options
Select Element
Submit Button
Textarea Element
Colophon
Return to
CSS Cookbook