Follow Slashdot blog updates by subscribing to our blog RSS feed

 



Forgot your password?
typodupeerror
×

CSS: The Missing Manual 151

Michael J. Ross writes "Ever since Cascading Style Sheets (CSS) first appeared on the Web scene in the late 1990s, a plethora of books have been written and published that purport to explain how CSS works, and how to make it work for you. So why would any publisher decide that what the technical world needs is yet another CSS book? Perhaps because they have taken a close look at the bulk of those available titles, and found them to be wanting — filled with overly theoretical explanations and sample code that is far too focused on some pet domain of the author. Such books may be adequate for the veteran Web developer, who has the time and inclination to separate the wheat from the chaff. But developers new to CSS need much more approachable material, with clear examples. Perhaps that is the thinking behind CSS: The Missing Manual." Read the rest of Michael's review.
CSS: The Missing Manual
author David Sawyer McFarland
pages 494
publisher O'Reilly Media
rating 7
reviewer Michael J. Ross
ISBN 0596526873
summary An accessible guide to using CSS with HTML.


Written by David Sawyer McFarland, CSS: The Missing Manual is published by O'Reilly Media, as part of their Pogue Press series, under the ISBN 0596526873. It first came out in August of 2006. The publisher maintains a Web page for the book, where visitors can find a link to register their copy of the book (does anyone do that?), a page for submitting errata (none yet, as of this writing), a form for posting a review on the O'Reilly site (again, be the first!), and a sample chapter (Chapter 1: Rethinking HTML for CSS) as a PDF file. There are also links for purchasing the book in the U.S. or the UK, and for reading the online version, as a part of O'Reilly's Safari service.

The book's 494 pages are organized into 14 chapters and three appendices, grouped into five parts. In addition, there is an index, as well as a terse but meaty introduction, which even includes a summary of HTML. The humor for which the Missing Manual books are known, begins early, in introduction, though in this case probably not intentionally: Page 9 claims that the book "is divided into four parts," and then lists the five parts. Before commenting upon those five-ish four parts, it should be noted that the table of contents runs seven pages, listing the book's parts, chapters, sections, and subsections. Future editions of the book would benefit from an overview table of contents, similar to those used in an increasing number of technical books, to good effect.

The 14 chapters cover most if not all of the essentials: writing HTML for CSS; creating styles and style sheets; determining what to style; using inheritance; using cascading; formatting text; setting margins, padding, and borders; styling graphics; styling links and navigation bars; styling tables and forms; creating float-based layouts; positioning page elements; creating print stylesheets; and writing maintainable CSS code. The three appendices include a CSS property reference, a discussion of CSS use in Dreamweaver version 8, and a listing of CSS resources to supplement the book.

On the positive side of the ledger, the author does a commendable job of clearly explaining all of the essential topics that the typical developer would need to understand in order to begin developing a robust Web site based on HTML and CSS, or reworking an existing site that is in desperate need of an overhaul. The clear explanations and bite-sized examples demonstrate that David Sawyer McFarland is not only an experienced Web developer, but likely has spent considerable time explaining to others how to do the same — as a writer, trainer, and instructor. This book is not his first, for he has previously written Dreamweaver: The Missing Manual.

One valuable aspect of the book under review, is that McFarland discusses how to overcome the most commonly encountered browser problems, in which Web pages employing CSS are not being formatted as one would expect and as specified in the CSS standards, by misbehaving browsers (that means you, "Internet Exploder"). Moreover, the book is also one of the first to document the significantly enhanced, long overdue, and welcomed CSS support in version 7 of the most commonly used Web browser (yes, we're still looking at you, "Browser by Bill").

The book is one in a series of many so-called Missing Manuals, whose tagline is "The books that should have been in the box," and whose Web site characterizes them as "Warm, witty, and jargon-free, [with] enough clarity for the novice, and enough depth and detail for the power user." In many respects, McFarland's latest contribution matches that description. In addition to the straightforward and yet comprehensive discussions of each topic, the author imbues his writing with a bit of humor, without overdoing it, or trying too hard, as is sometimes seen in other books covering subjects that admittedly can be quite dry.

On the negative side of the ledger, someone — or, more likely, some committee — somewhere along the decision chain, stipulated that almost every page of the book should be formatted so that the outside 1.5 inches, which is the easiest for a reader to see, should be consumed by a mostly empty and useless gutter, the bulk of which is filled with a light gray bar. This pushes the text, which slightly more than 4.5 inches wide, further in, toward the book's binding, and thus more difficult to read. This is true even though O'Reilly has wisely chosen to use RepKover, a flexible lay-flat binding. This exasperating style of layout is not characteristic of O'Reilly's books, which are generally much easier to read, with more sensible margins and often larger font.

One of the first principles taught to those learning Web design, is to avoid using white text on a black background. Such Web pages usually try to appear cool and edgy, but instead often comes off as immature in the eyes of an Internet veteran, and sinister to the Internet newbie. It doesn't work on Web sites, and it doesn't work in Web books. Sadly, O'Reilly chose to use white-on-dark-gray for many of the book's sidebars, making them difficult to read, especially as the sidebar text font size appears to be a bit smaller than that of the regular text.

In a nutshell, the content of this book is excellent, while the presentation of that content leaves much to be desired — ironic for a book focusing on CSS, whose primary purpose is to modularize and simplify presentation, neatly separating it from content. Ranking the content and presentation on a scale of 1 to 10, I would give them 9 and 5, respectively. Yet on balance, just as is true for most Web pages, the content is more important than its layout and other aesthetic considerations. CSS: The Missing Manual is a well-written, lighthearted, up-to-date, and easily accessible guide to modern CSS and how to use it in the real world.


You can purchase CSS: The Missing Manual from bn.com. Slashdot welcomes readers' book reviews -- to see your own review here, read the book review guidelines, then visit the submission page.
This discussion has been archived. No new comments can be posted.

CSS: The Missing Manual

Comments Filter:
  • by 99BottlesOfBeerInMyF ( 813746 ) on Wednesday September 06, 2006 @04:55PM (#16055213)

    Must be nice to not have to maintain public-facing pages for a large company, or otherwise actually be in the web business.

    True. The network security industry usually won't touch IE with a 10 foot pole. We had a really critical IE bug in one of our Web UIs and no one found it for more than a year, until someone used a legacy machine in their testbed as a convenient terminal.

    The sad thing is, if all the major companies would pledge to adhere to Web standards and use them along with the aforementioned download link, the problem would probably go away in short order as everyone would switch or MS would be under too much very public pressure and would fix IE.

  • by Siberwulf ( 921893 ) on Wednesday September 06, 2006 @05:04PM (#16055276)
    I personally don't think pain is going to bring about change. I work in the web business and develop .NET applications. The actual functionality isn't an issue across browsers, but yeah the apps I make break in FF, Opera and Safari.

    That said we can't afford to not cater to IE users. They make up over 95% of clients. I haven't yet heard a complaint or seen some feedback come through our form stating "omg I gotta use IE!!!"
  • by soliptic ( 665417 ) on Wednesday September 06, 2006 @05:52PM (#16055589) Journal
    Actually I can go one better than that, I think.

    I follow the standards and still have it looking decent in IE. I never use "IE hacks" (as in deliberately malformed statements or comments), and I never use browser detection (both are basically a bit retarded imho) -- but I can still get the pages to look OK in IE, served exactly the same (validated) CSS.

    There are just a few caveats:
    • Be prepared to abandon hope of absolute pixel-level control over everything. Seriously, if you want that, go into print design, that's not how the web works.
    • (Sometimes this one works as an OR to the above point...) Fix the box model by adding an extra non-semantic div. Simple as that. Voila, no more broken box model, but no invalid CSS full of Tantek hacks [tantek.com] either. I don't know why more webdesigners are so against this. Banging on about favouring standards, yet they'd rather deliberately break (invalidate) their own CSS than add a single non-semantic wrapper div? I never quite grasped that. The broken IE box model is responsible for the vast majority of places where pixel-accurate control breaks down between IE and, well, the rest. Of course, it doesn't help fix your 3-pixel jog [positioniseverything.net] (for example), but it certainly cuts out the biggest offenders.
    • Be prepared to lose a few bells and whistles - for example, no :hover pseudoclass on arbitrary elements. So you can't have table cells that change color as you mouseover. This is pure candy though, so I'm prepared to "not support" IE in this regard. The overall layout/style is exactly the same, so it's not like I'm making IE degrade to "plain, unformatted hypertext" as you suggest - just they miss a few tiny "cherry on top" effects.
    • (Again this is a bit of an OR to the previous point) - use javascript. For example, get the effect of arbitrary :hover by using suckerfish [htmldog.com] javascript techniques.
    And before anybody asks, yes, I do maintain public-facing web pages for a large organisation.

    Admittedly our main website is horrible non-standards HTML4 with patchy use of hack-filled CSS, but I didnt design it, and I can't fix it because even when I enter valid markup, our lousy CMS (built firmly on the MS stack with the MS toolchain, just to feed your prejudices) will bodge it up for me. Grrr.

    But the new microsites I design are 100% standards compliant and they look 99% the same in IE or Moz/etc. My management wouldn't have it any other way.
  • by morgan_greywolf ( 835522 ) on Wednesday September 06, 2006 @06:19PM (#16055788) Homepage Journal
    The reason the Windows IE had such bad CSS support was because they didn't work with the Mac IE team. IE 5 for the Mac had better css support than any Windows IE, except maybe IE 7?


    Well, IE 7 reportedly only supports 50% of the CSS standard, so if Mac IE 5's CSS standard is worse than than IE 7's, then it would still be pretty awful.

  • Re:CSS Zen Garden (Score:3, Interesting)

    by falconwolf ( 725481 ) <falconsoaring_2000 AT yahoo DOT com> on Wednesday September 06, 2006 @07:15PM (#16056117)

    Manuals are fine, but most can be replaced by the various excellent websites around - w3schools is mentioned below and I'd agree with that.

    Books can't be replace for all people. Though I have Zen Garden bookmarked if I read much I have to have hardcopy to read from otherwise I get eye strained and will get a headache. Looking at little bits and pieces on a screen is alright but longer pages play havoc with my eyes. Also if I'm trying to learn something I much prefer to have a book to go through especially when it's something like this. If I'm doing exercises and have a book I don't need to switch between apps as much as if I google or read off of some website. When I do read a webpage that's too long I have to print it out and read the hardcopy, and I know other people who are the same. And yes, I have Zen Gardens bookmarked. Simply, some do better with hardcopy, such as a book. Now, I'm hoping an lcd display is better.

    Falcon

So you think that money is the root of all evil. Have you ever asked what is the root of money? -- Ayn Rand

Working...