Home | Best Seller | FAQ | Contact Us | ||||
| ||||
|
';figDoc.write(zhtm);figDoc.close();}// modified 3.1.99 RWE v4.1 -->IntroductionIntroduction
As many readers are no doubt aware, I've spent a good deal of time andenergy on the subject of CSS during the past six years. In addition to articlesand support charts and test suites, I've also written Cascading StyleSheets: The Definitive Guide (O'Reilly, 2000) and Cascading StyleSheets 2.0 Programmer's Reference (Osborne/McGraw-Hill, 2001), which tome always felt like two legs of a three-legged stool. The first leg coveredtheory in detail with the intent of educating the reader how CSS works in allits details. The second leg was meant for CSS authors who needed a referencetext to help them write clean CSS the first time and to remind them of valuenames and meanings. The missing third leg was a book that showed how CSS worksin a hands-on, practical way, preferably in full living color.
Happily, the third leg is missing no longer: Thanks to New Riders,you're holding it in your hands right now.Should You Buy This Book?
That isn't a facetious question. As proud as I am of the work containedin these pages, I'm also keenly aware that this book is not for everyreader. So let me take a moment to describe two kinds of readers: those forwhom this book was written and those for whom it was not.Those For Whom This Book Is Meant
You ought to find this book useful if you match one or more of the followingcriteria:
You want a hands-on, practical guide to using CSS in real-world projects.That's exactly what this book is all about.
You're a hands-on learner, someone who gets a lot more out ofinteractive experimenting than from just reading a book. Despite the fact thatthis is indeed a book, it's been intentionally designed to let the reader"play along at home," as it were.
You've been meaning to increase your CSS skills for some time now,but you keep putting it off because CSS is a large, complex subject, and youdon't have a roadmap for how to get to the next level.
You've always wanted someone to show you how to convert a typical,old-school, pure-HTML design into a blend of HTML and CSS and to explain whyit's to your advantage to do so. If that's the case, go to Project 1,"Converting an Existing Page," without another moment'sdelay.
If asked, you would describe your HTML skill level as"intermediate" or "expert" and your CSS skill level as"basic" or "intermediate." In other words, you understandHTML fairly well and have used enough CSS to have a basic grasp of how it'swritten.Those For Whom This Book Is Not Meant
You might not find this book to be useful if one or more of the followingdescribes you:
You've never used or even seen CSS before. Although some basic termsare defined in the text and I've included a short glossary, the assumptionhere is that the reader knows the basics of writing CSS and is fairly proficientwith HTML authoring.
You want to understand all of the subtleties of the theory underlying CSSand grasp the nuances of the specification. There are now many books on themarket that occupy that niche. The focus here is on demonstrating effects thatwork.
You've only done Web design in a point-and-click editingenvironment. This book assumes that you can edit (or have edited) HTML and CSSby hand, and its narrative is based on that assumption. Its projects may beeasily reproducible in a point-and-click editor, but the book was not writtenwith such editors in mind.
You want a book that will tell you how to write CSS that will look thesame in all browsers on all platforms, including Netscape 4.x and Explorer 3.x.See the following section, "What You Can Expect from This Book," fordetails.
You've read my other works and hate the personal, familiar tone Itake in my writing. I promise you that my writing style has changed verylittle.What You Can Expect From This Book
From the outset, my intent has been to write an engaging, interactive bookthat focuses on practical and interesting uses of CSS that can be deployed intoday's browsers. To do this, each project evolves from having no styles tobeing fully styled and ready for deployment on the Web. If I've done my jobwell, you should get the feeling of watching over my shoulder as I work on aproject, with me commenting on what I'm doing as I do it.
Although you can simply read the text and look at the figures to get a senseof how a project is evolving, I think the best way to work along with the bookis to have a Web browser and a text editor open as you read. That way, you canfollow along with the changes I make in the text by physically making the samechanges in your project file and seeing the changes in your own Web browser.
There is one point on which I want to be very clear: The techniques shown inthis book are generally meant for browsers whose version number is greater thanor equal to 5. If you have to design a site that looks the same in Explorer 4.xand Netscape 4.x as it does in IE6.x and NS6.x, this book is not for you.In fact, "Tricking Browsers and Hiding Styles" on the Web site spendsa good deal of time describing ways to hide CSS from version-4 browsers. Suchtechniques allow you to write CSS for modern browsers and still let the contentdisplay (albeit in a much plainer way) in older browsers. That's about asfar as this book goes to cater to the limitations of version-4 browsers,however.Overview
In keeping with the practical, hands-on nature of this book, I'vedivided it into a series of 13 projectseach one effectively a chapter. Itis possible to skip around from project to project as the spirit moves youbecause each project was written to stand on its own as much as possible.However, the book was still written with the linear reader in mind, and if youread from front to back, you should find that the projects build on oneanother.
With a few exceptions, the projects are titled in as self-obvious a way aspossible. For example, Project 1 takes a page designed using only HTML markupand spacer GIFs and converts it to an HTML-plus-CSS design.
Projects 2 through 5 cover some fairly basic projects, from touching up apress release or an events calendar to making hyperlinks look better than theyever have before. Projects 6 and 7 increase the sophistication somewhat byfocusing on printing and the styling of form elements in more than one medium.Then, in Projects 8 through 11, the topics of discussion are positioning,integration of various styling techniques, and how to make designs look moreorganic and less boxy.
Project 12 takes a look at a powerful and potentially beautiful techniquethat isn't widely supported but can be adapted to work in the real world.In some ways, this is a look ahead to a future in which CSS support is morewidespread, but if you pick the right tools, you can flex your artistic musclestoday. All work and no play makes for a boring book, I always say.
Project 13 is the most ambitious and complex of the book: It is an attempt tore-create, as closely as possible, the visual design of this book in HTML andCSS. Just as important as the ways in which the look can be re-created are thediscussions of why certain things can't be exactly reproduced on theWeb.Companion Web Site
Each project in the book is based on the editing of a real project file. Youcan either download the project files for the entire book at once, or for eachchapter individually. The project files are available on the book'scompanion Web site:http://www.ericmeyeroncss.com/.There you will find "Picking a Rendering Mode" and "TrickingBrowsers and Hiding Styles" (which are of a more practical and theoreticalnature than the projects themselves), a short Glossary of terms, the files thatwere used to produce the figures throughout the book, any errata to the book,and supplemental materials like bonus text, commentary from the author, andlinks to useful on line resources.
For each project, there will be an archive of all the files you need to workalong with the text, which includes any graphic files needed as well as aversion of the project file at its outset. These files follow a consistentnaming; for example, the Project 1 file will be ch01proj.html. This isthe file you should open up with a text editor and make changes to as theproject moves forward. You can also load it into a Web browser and hit"Reload" at each step to see what effect the new styles have.Conventions
This book follows a few typographical conventions that you should be familiarwith before proceeding.
A new term is set in italics the first time it is introduced. Therewill often be a short definition of the term nearby. Program text, functions,variables, and other "computer language" are set in a fixed-pitchfont. In regular text, it will also be a dark blue colorfor example, whenmentioning the property margin or a value like 10px.
Code blocks are set entirely in a fixed-pitch font. Any red text within acode block indicates a change to the code from its previous state. Most codeblocks show only a fragment of the overall document or style sheet, with thelines to be changed (or inserted) surrounded by unchanged text. This extra textprovides a sense of context, making it easier to find the part you need tochange if you're following along with the text. Here is an example:
<head>
<title>Travel Guide: Ragged Point Inn</title>
<style type="text/css">
table {border: 2px solid red; margin: 3px;}
td {border: 1px dotted purple; padding: 2px;}
</style>
</head>
Every computer book has its own style of presenting information. As you flipthrough this book, you'll notice that it has an interesting layout. Hereare the layout conventions:
Asides
These usually contain detailed explanations that are related to the main text but are not a part of the project itself. They might also offer alternative approaches or ideas to those demonstrated in a project. In every case, they can be skipped without disrupting the project's flow.
Notes
These are meant to be helpful annotations to the main text, and there are alot of them in this book. These are used to provide tips, asides, definitions of new terms, tangential points, or related bits of information.
Warnings
These indicate a point that might cause problems in some browsers or a similarly grave note of caution.
Web site notes provide guidance as to which files to download or load into aWeb browser, or things to check out on the Web.
Finally, at the end of each project you will find a section titled"Branching Out." This will present three short exercises that inviteyou to try modifying the finished project in certain ways. These"branches" are certainly not the end of what you can do, but they mayhelp you start experimenting with the concepts presented in the project. Thinkof them as jumping-off points for your own design ideas and also as interestingchallenges in their own right. If you can match the illustrations with your ownstyles, then you'll be well on your way to writing creative CSS of yourown.
© Copyright Pearson Education. All rights reserved.
Eric Meyer on CSS: Mastering the Language of Web Design
FROM THE PUBLISHER
There are several other books on the market that serve as in-depth technical guides or reference books for CSS. None, however, take a more hands-on approach and use practical examples to teach readers how to solve the problems they face in designing with CSS - until now. Eric Meyer provides a variety of carefully crafted projects that teach how to use CSS and why particular methods were chosen. The web site includes all of the files needed to complete the tutorials in the book. In addition, bonus information is be posted.
SYNOPSIS
Meyer (a standards evangelist with Netscape Communications) uses 13 hands-on projects to teach Web developers how to use cascading style sheets (CSS). Each project is cross-browser compatible. Topics include, for example, converting an existing HTML page to CSS, styling an events calendar, making an input form look good, fixing backgrounds, and creating non-rectangular layout effects. It is assumed that the reader already knows the basics of writing CSS and is proficient with HTML authoring. Annotation (c)2003 Book News, Inc., Portland, OR
|