ADAPTING TO WEB STANDARDS CSS and Ajax for Big Sites Christopher Schmitt, Kimberly Blessing, Rob Cherny, Meryl K. Evans, Kevin Lawver, and Mark Trammell Adapting to Web Standards: CSS and Ajax for Big Sites Christopher Schmitt Kimberly Blessing Rob Cherny Meryl K. Evans Kevin Lawver Mark Trammell New Riders 1249 Eighth Street Berkeley, CA 94710 510/524-2178 510/524-2221 (fax) Find us on the World Wide Web at: www.newriders.com To report errors, please send a note to
[email protected] New Riders is an imprint of Peachpit, a division of Pearson Education Copyright © 2008 by Christopher Schmitt and Kevin Lawver Project Editor: Victor Gavenda Production Editor: Hilal Sala Development Editor: Wendy Katz Copyeditor: Doug Adrianson Tech Editor: Molly Holzschlag Proofreader: Doug Adrianson Compositor: Kim Scott, Bumpy Design Indexer: Emily Glossbrenner Cover design: Charlene Charles-Will Interior design: Kim Scott, Bumpy Design Notice of Rights All rights reserved. No part of this book may be reproduced or transmitted in any form by any means, electronic, mechanical, photocopying, recording, or otherwise, without the prior written permission of the publisher. For information on getting permission for reprints and excerpts, contact
[email protected] Notice of Liability The information in this book is distributed on an “As Is” basis without warranty. While every precaution has been taken in the preparation of the book, neither the authors nor Peachpit shall have any liability to any person or entity with respect to any loss or damage caused or alleged to be caused directly or indirectly by the instructions contained in this book or by the computer software and hardware products described in it. Trademarks Many of the designations used by manufacturers and sellers to distinguish their products are claimed as trademarks. Where those designations appear in this book, and Peachpit was aware of a trademark claim, the designations appear as requested by the owner of the trademark. All other product names and services identified throughout this book are used in editorial fashion only and for the benefit of such companies with no intention of infringement of the trademark. No such use, or the use of any trade name, is intended to convey endorsement or other affiliation with this book. ISBN-13: 978-0-321-50182-0 ISBN 0-321-50182-9 987654321 Printed and bound in the United States of America Acknowledgements Adapting to Web Standards tackles the very real problems of reaching out and teaching people about Web standards, but also how to incorporate those technologies into everyday workflows when swift and frequent deadlines often crush progress. Written to empower the individual designer and the large organizations to start working in the correct direction, Adapting to Web Standards required the involvement the hands of a great number of professionals. If you know Rob Cherny, you know a true Web specialist. He seems to cover every aspect of the DOM. His presence is felt in the core of this book from the introduction up through the fourth chapter. I’m not sure how Kimberly Blessing came into the book project. I believe it was during one of those mad, late night pushes to get edits and reviews out the proverbial door when she chimed in to offered to write about managing Web standards. That turned into Chapter 5 of the current book. I’m grateful for her time and support for this project. Special thanks go to Meryl K. Evans, the content maven. She stepped in at the right moment to help tackle the Tori Amos chapter. I was honored when I talked to Kevin Lawver about buildin