0. Preface * Who Should Read this Book? * What s Covered in this Book? * The Book s Web Site o The Code Archive o Updates and Errata * The SitePoint Forums * The SitePoint Newsletters * Your Feedback * Acknowledgments * Conventions Used in this Book o Markup Samples o Tips, Notes, and Warnings 1. Getting Started with CSS * Defining Styles with CSS o lnline Styles o Embedded Styles o External Style Sheets * CSS Selectors o Type Selectors o Class Selectors o ID Selectors o Descendant Selectors o Child Selectors o Pseudo-class Selectors * Summary 2. Text Styling and Other Basics * How do I replace tags with CSS? o Solution * Should I use pixels, points, ems, or something else to set font sizes? o Solution o Discussion * How do I set my text to display in a certain font? o Solution o Discussion * How do I remove underlines from my links? o Solution o Discussion * How do I create a link that changes color when the cursor moves over it? o Solution * How do I display two different styles of link on one page? o Solution * How do I style the first item in a list differently from the others? o Solution * How do I add a background color to a heading? o Solution * How do I style headings with underlines? o Solution * How do I remove the large gap between an h1 element and the following paragraph? o Solution * How do I highlight text on the page? o Solution * How do I alter the line height (leading) on my text? o Solution * How do I justify text? o Solution o Discussion * How do I style a horizontal rule? o Solution * How do I indent text? o Solution o Discussion * How do I center text? o Solution * How do I change text to all capitals using CSS? o Solution o Discussion * How do I change or remove the bullets on list items? o Solution o Discussion * How do I use an image for a list-item bullet? o Solution * How do I remove the indented left-hand margin from a list? o Solution o Discussion * How do I display a list horizontally? o Solution * How do I add comments to my CSS file? o Solution * How do I remove page margins without adding attributes to the tag? o Solution * How can I remove browsers default padding and margins from all elements? o Solution o Discussion * Summary 3. CSS and Images * How do I add borders to images? o Solution * How do I use CSS to replace the deprecated HTML border attribute on images? o Solution * How do I set a background image for my page using CSS? o Solution o Discussion * How do I position my background image? o Solution o Discussion * How do I fix my background image in place when the page is scrolled? o Solution o Discussion * Can I set a background image on any element? o Solution o Discussion * How do I place text on top of an image? o Solution o Discussion * How do I add more than one background image to my document? o Solution o Discussion * How can I use transparency in my pages? o Solution o Discussion * Summary 4. Navigation * How do I replace image-based navigation with CSS? o Solution o Discussion * How do I style a structural list as a navigation menu? o Solution o Discussion * How do I use CSS to create rollover navigation without images or JavaScript? o Solution o Discussion * Can I use CSS and lists to create a navigation system with subnavigation? o Solution o Discussion * How do I make a horizontal menu using CSS and lists? o Solution o Discussion * How do I create button-like navigation using CSS? o Solution o Discussion * How do I create tabbed navigation with CSS? o Solution o Discussion * How do I change the cursor type? o Solution o Discussion * How do I create rollovers in CSS without using JavaScript? o Solution o Discussion * How can I create pure CSS drop-down menus? o Solution o Discussion * Summary 5. Tabular Data * How do I lay out spreadsheet data using CSS? o Solution o Discussion * How do I ensure that my tabular data is accessible as well as attractive? o Solution o Discussion * How do I add a border to a table without using the HTML border attribute? o Solution o Discussion * How do I stop spaces appearing between the cells of my table when I ve added borders using CSS? o Solution * How do I display spreadsheet data in an attractive and usable way? o Solution o Discussion * How do I display table rows in alternating colors? o Solution o Discussion * How do I change a row s background color when the cursor hovers over it? o Solution o Discussion * How do I display table columns in alternating colors? o Solution o Discussion * How do I display a calendar using CSS? o Solution o Discussion * Summary 6. Forms and User Interfaces * How do I style form elements using CSS? o Solution o Discussion * How do I apply different styles to fields in a single form? o Solution o Discussion * How do I stop my form creating additional white space and line breaks? o Solution * How do I make a Submit button look like text? o Solution * How do I ensure that users with text-only devices understand how to complete my form? o Solution o Discussion * How do I lay out a two-column form using CSS instead of a table? o Discussion * How do I group related fields? o Solution o Discussion * How do I style accesskey hints? o Solution o Discussion * How do I use different colored highlights in a select menu? o Solution * I have a form that allows users to enter data as if into a spreadsheet. How do I style it with CSS? o Discussion * How do I highlight the form field that the user clicks into? o Solution o Discussion * Summary 7. Cross-browser Techniques * In which browsers should I test my site? o Solution * I only have access to one operating system. How can I test in more of these browsers? o Solution * Is there a service that can show me how my site looks in various browsers? o Solution o Discussion * Can I install multiple versions of Internet Explorer on Windows? o Solution * How do I display a basic style sheet for really old browsers? o Solution o Discussion * How do I hide some CSS from a particular browser? o Solution o Discussion * How can I send different styles to a particular browser? o Solution o Discussion * How do I achieve alpha transparency in Internet Explorer 6? o Solution o Discussion * What is DOCTYPE switching and how do I use it? o Solution o Discussion * I think I ve found a CSS bug! What do I do? o Solution * Some of my content is appearing and disappearing in Internet Explorer 6! What should I do? o Solution * What do the error and warning messages in the W3C Validator mean? o Solution * Summary 8. Accessibility and Alternative Devices * How do I test my site in a text-only browser? o Solution o Discussion * How do I test my site in a screen reader? o Solution o Discussion * How do I create style sheets for specific devices, such as screen readers or WebTV? o Solution o Discussion * How do I ...