CSS3 For Dummies
Published by: John Wiley & Sons, Inc., 111 River Street, Hoboken, NJ 07030-5774, www.wiley.com
Copyright 2014 by John Wiley & Sons, Inc., Hoboken, New Jersey
Published simultaneously in Canada
No part of this publication may be reproduced, stored in a retrieval system or transmitted in any form or by any means, electronic, mechanical, photocopying, recording, scanning or otherwise, except as permitted under Sections 107 or 108 of the 1976 United States Copyright Act, without the prior written permission of the Publisher. Requests to the Publisher for permission should be addressed to the Permissions Department, John Wiley & Sons, Inc., 111 River Street, Hoboken, NJ 07030, (201) 748-6011, fax (201) 748-6008, or online at http://www.wiley.com/go/permissions .
Trademarks: Wiley, For Dummies, the Dummies Man logo, Dummies.com, Making Everything Easier, and related trade dress are trademarks or registered trademarks of John Wiley & Sons, Inc., and may not be used without written permission. All other trademarks are the property of their respective owners. John Wiley & Sons, Inc., is not associated with any product or vendor mentioned in this book.
Limit of Liability/Disclaimer of Warranty: The publisher and the author make no representations or warranties with respect to the accuracy or completeness of the contents of this work and specifically disclaim all warranties, including without limitation warranties of fitness for a particular purpose. No warranty may be created or extended by sales or promotional materials. The advice and strategies contained herein may not be suitable for every situation. This work is sold with the understanding that the publisher is not engaged in rendering legal, accounting, or other professional services. If professional assistance is required, the services of a competent professional person should be sought. Neither the publisher nor the author shall be liable for damages arising herefrom. The fact that an organization or Website is referred to in this work as a citation and/or a potential source of further information does not mean that the author or the publisher endorses the information the organization or Website may provide or recommendations it may make. Further, readers should be aware that Internet Websites listed in this work may have changed or disappeared between when this work was written and when it is read.
For general information on our other products and services, please contact our Customer Care Department within the U.S. at 877-762-2974, outside the U.S. at 317-572-3993, or fax 317-572-4002. For technical support, please visit www.wiley.com/techsupport .
Wiley publishes in a variety of print and electronic formats and by print-on-demand. Some material included with standard print versions of this book may not be included in e-books or in print-on-demand. If this book refers to media such as a CD or DVD that is not included in the version you purchased, you may download this material at http://booksupport.wiley.com . For more information about Wiley products, visit www.wiley.com .
Library of Congress Control Number: 2013948027
ISBN 978-1-118-44142-8 (pbk); ISBN 978-1-118-46210-2 (ebk); ISBN 978-1-118-61240-8 (ebk); ISBN 978-1-118-61261-3 (ebk)
Manufactured in the United States of America
10 9 8 7 6 5 4 3 2 1
Introduction
C ascading Style Sheets (CSS) help you define a websites presentation and special effects. Because of this capability, most books about CSS on the market are written for designers. They get into the artistic elements of CSS and make you create everything from scratch. CSS3 for Dummies is different. It was written with the developer in mind. It may not seem as if a developer necessarily would need to know about presentation and design-related issues, but users want applications that are pleasant to use, so developers need to know about both topics. This book assumes that youre a developer, and that youre busy that you really need to get a great-looking application out yesterday because the boss is breathing down your neck. You dont need to be an artist to produce spectacular sites you just need a helping hand. Most of the artworks already done for you you just need to know where to find it.
About This Book
Your time is valuable. This book helps you understand quickly how to use tools to create great-looking applications that provide all the right user prompts in a fraction of the time it would take you to write the application from scratch. In fact, once you know the secrets in this book, you may wonder why other people think working with CSS3 is hard. By the time you complete this book, youll be able to dazzle the user and make your boss think you spent days working on the page that only took a few hours to write this morning. Even though complete applications will take longer, you can create usable mockups of what your application will look like in an incredibly short time.
However, this book isnt all about tools. When necessary, you see how things work at a much lower level so that you can maintain the code you create with the same ease that you experienced when putting it together. Instead of covering absolutely every nuance of CSS3 development, though, CSS3 For Dummies concentrates on the CSS3 features you use most often and examines them in a real-world functional environment.
No, this book wont turn you into a designer, but thats the point. Youll become a developer who can compete with the best designers out there, on your own terms, by using tools that designers generally dont rely upon. The difference is that your sites wont be unique one-offs theyll rely on the huge base of predefined templates and tools that already exist for everyone to use. Even so, everyone will think your offerings are unique because of the way you can use these various tools together to create results that look unique.
The chapters were written for everyday developers, but note that a portion of most chapters contains advanced material, mostly in sidebars, that will interest only some readers. When you see one of these specialized topics, feel free to skip it.
You can also skip any material marked with a Technical Stuff icon. This material is helpful, but you dont have to know it to work with CSS3, HTML, or JavaScript. I include this material because I find it helpful in my programming efforts and believe that you will, too.
This book uses special typefaces to emphasize some information. For example, entries that you need to type appear in bold . All code, website URLs, and onscreen messages appear in monofont type
. When I define a new word, you see that word in italics .
Because you use multiple applications when you're working with CSS3, I always point out when to move from one application to the next. Note, however, that the testers for this book tried out the code with the Internet Explorer, Firefox, and Chrome browsers on the Macintosh, Linux, and Windows platforms. One tester also checked at least some of the code using a Windows 8 phone. In most cases, you shouldn't experience any problem working with your application unless specifically noted in the application description. Please let me know (at John@JohnMuellerBooks.com
) if you ever experience a problem with one of the examples.
Foolish Assumptions
You might find it difficult to believe that Ive assumed anything about you after all, I havent even met you yet! Although most assumptions are indeed foolish, I made these assumptions to provide a starting point for the book.