Slashdot Mirror


Core CSS (2nd ed.)

Simon P. Chappell writes "It used to be that a website could be standards compliant or it could be attractive and impressive to prospective customers, but it could almost never be both. Now with the rise of CSS compliant browsers, a new generation of web designers are finding that the old wisdom is ready to be retired. CSS technology allows a website to have both excellent, semantically indicated content and attractive layouts. Core CSS (2ed.) positions itself as a complete guide to all of this standards based goodness." Read on for the rest of Chappell's review. Core CSS (2nd ed.) author Keith Schengli-Roberts pages 818 (10 page index) publisher Prentice Hall rating 6 reviewer Simon P. Chappell ISBN 0130092789 summary A flawed diamond

What is CSS? Cascading Style Sheets (the CSS part of the book's title) are a way to separate the content and presentation of a web page. The CSS file holds the presentation instructions, leaving the HTML to hold only the content. While CSS is a formal World Wide Web Consortium (W3C) standard, the adoption has been somewhat slow, with browsers only reaching full compliance with the base level of the standard within the past year or so. So why is CSS useful? CSS shines when it is used to define the style of a whole site. Want all of your headings to be the right shade of your corporate blue? No problem. Want every page to have the corporate logo on it's background? No problem. Whoops, got bought by GlobalMegaUberCorporation Inc. and need to change the colours and background logos in a hurry? No problem, just change the CSS definitions and your new corporate identity will shine out for all your customers to see. What do I know about CSS? I am a relative newcomer to CSS, having been laying out websites using tables since 1995. I had decided that it was time to learn how to bring my personal website up to speed with the latest standards, when I was offered the chance to review this book, so I took Prentice Hall PTR up on the opportunity. This review then, is from the perspective of one who knows HTML well enough to develop a couple of sites using only vi and who has decided to learn CSS. Overview The back cover blurb claims that Core CSS 2nd Edition is a comprehensive guide that shows both beginning and expert web developers all they need to know to achieve great results with the latest style sheet properties. It also claims to be ... the most complete and up-to-date CSS reference available. This review will explore those two claims. What's To Like The first thing to like about this book is that it does cover almost everything that it's possible to write about Cascading Style Sheets. I have included the table of contents below so that you can get a feel for the breadth that this book aims at covering. The writing style is clear and explanatory with an underlying conversational tone, quite suited to this manner of book. It is also obvious from the text that Mr. Schengli-Roberts does understand his subject matter very well indeed.

The biggest thing to like about this book, for me, is appendix B, an alphabetical listing of the defined CSS properties and values. This list covers 92 pages and is a key part of the whole book. Importantly, it doesn't feel like filler and gives an impression that care has been taken in devising this very useful resource. Each entry in the appendix gives an example of correct usage of each property, which as a CSS neophyte I appreciated greatly.

What's To Consider This book carries a 2004 copyright, yet it feels old when you view the list of browser compatibilities for each property. While it does give compatibility information for Microsoft Internet Explorer 6, it only covers Mozilla 1.0, it mentions Konqueror without any version details and completely omits Apple's Safari browser. This spotty coverage seems at odds with the rest of the book and really felt like a glaring omission to me. Summary This is a good book -- and if you're in the process of learning to use Cascading Style Sheets, you should certainly consider it for your collection. It is flawed by a poor selection of browsers for it's compatibility lists; while this may not be an issue for you, I found it quite irksome. This explains my review score and my description of this book as a flawed diamond.

Far more information than most people could ever want to know about Simon P. Chappell is available at his personal website. You can purchase Core CSS (2nd ed.) from bn.com. Slashdot welcomes readers' book reviews -- to see your own review here, carefully read the book review guidelines, then visit the submission page.

19 of 314 comments (clear)

  1. CSS sucks by Anonymous Coward · · Score: 5, Funny

    Run DeCSS and be free of it forever!

  2. CSS Zen Garden by cmstremi · · Score: 5, Informative

    csszengarden.com is a great example of CSS can be rich, powerful and compliant.

    1. Re:CSS Zen Garden by Neon+Spiral+Injector · · Score: 5, Insightful

      I do with people would stop pointing to this site as a paramount of CSS design. While their work may be "rich, powerful and compliant", it is not, as you have noticed, "flexable".

      What is so hard about using "em" as the base measurement for the layout? Also, the main content text size should always be 1em, i.e. not specified, allowing the browser's default size to be used.

      I run at 2048x1536 on a 19" monitor. GNOME with a SVG based theme just looks really crisp. But then I go to some website that thinks that 10px is a good font size. And has their entire layout based around a fixed 600px center column. So if I do Ctrl-+ to bump up the font size to something I can see, I end up with like 5 words on each line.

      Okay, I'm done...

  3. Content and Layout - Uh Oh by RetroGeek · · Score: 5, Informative

    both excellent, semantically indicated content and attractive layouts.

    Well I don't like the layout, but that is subjective.

    But click on Full CSS Browser Compatibility Chart and you get Warning: mysql_connect(): Access denied for user: 'corecss_corecss1@localhost' (Using password: YES) in /home/corecss/public_html/properties/full-chart.ph p on line 38

    Oops...

    --

    - - - - - - - - - - -
    I am a programmer. I am paid to produce syntax not grammar. Deal with it.
  4. heh... by ambienceman · · Score: 5, Funny

    For a minute there I thought Dave Chappelle wrote a book on CSS.

    I'm codin', bitch!
  5. Now all they need... by Bronz · · Score: 5, Funny


    Now all they need is a good database primer.

    "Warning: mysql_connect(): Access denied for user: 'corecss_corecss1@localhost' (Using password: YES) in /home/corecss/public_html/properties/full-chart.ph p on line 38"

  6. CSS, oh how I love thee... by Just+Some+Guy · · Score: 5, Interesting
    I was hired at my new job in part to completely re-write the website that our customers use to access information in our database. Since I was starting over with a blank slate, I got to pick every detail of the platform, so we jumped in with FreeBSD, Zope, Python, and XHTML/CSS.

    I truly don't understand why anyone is still using <font> tags. Instead of making the site design more difficult, strictly seperating appearance from content has made maintenance far easier. I'm still slightly amazed that I can completely re-do the appearance of my employer's website by editing a single file, and when my boss decided that he hated the way links looked, he was thrilled that it took me about 30 seconds to globally change them.

    Seriously, this is the way web design was meant to be.

    --
    Dewey, what part of this looks like authorities should be involved?
    1. Re:CSS, oh how I love thee... by brownpau · · Score: 5, Insightful

      Ah, but is far more semantic, and with a declaration of span.error{color: red;} , you can change any of the error spans to any color, font, or style you wish with just a line of text, instead of hunting through KBs and KBs of code to search/replace any tags you might have missed.

    2. Re:CSS, oh how I love thee... by Just+Some+Guy · · Score: 5, Insightful
      No offense, but never say never. Coding in part is about adapting and simplifying and sometimes, sometimes, it is easier and better to hard code something than to make it elegant.

      This is probably the one time where I am perfectly comfortable saying "never". In my years programming, not one have I ever seen a situation where

      my $grav = 9.8;
      ...
      my $y1 = 23 * $grav;
      my $y2 = 5 * $grav;
      wasn't much more understandable and maintainable than
      my $y1 = 23 * 9.8;
      my $y2 = 49;
      Using constants (or CSS) gives meaning to things that don't have obvious relationships. Seeing
      <em class="metasyn">foo</em>
      ...
      <em class="metasyn">bar</em>
      indicates that those two are somehow related. On the other hand,
      <font color="red">foo</font>
      ...
      <font color="red">bar</font>
      says nothing more than that the designer likes "red". "Hard" and "easy" are abstract concepts, until you're looking at your own code a year later and don't understand what you meant - then they're quite concrete.
      --
      Dewey, what part of this looks like authorities should be involved?
  7. Some good, some bad about this book by Muda69 · · Score: 5, Insightful

    What I have a problem with is the fact that the whole book, every example for every property, was completely embedded into the HTML itself. Their was a slight reference to externally described CSS but no examples to follow. The idea of the sheets is to set a number of parameters for most or all of your pages to follow. Embedding them into the HTML every time defeats the purpose. Also their were some mentions to multiple options techniques that never had any kind of example or visual of any kind to follow so you can see how this could be useful. In that sense the beginner user would be completely lost on something that can be helpful down the road.

  8. And Then There's IE by Cruxus · · Score: 5, Interesting

    Cascading Style Sheets are all well and good--actually, I use them on my website, and I love them--but the painful part is ensuring compliance among browsers. I'm a self-taught, amateur geek, and I code my XHTML and CSS by hand. I don't read tutorials: I read the W3C recommendations. Anyway, I like to think I can interpret rather exacting writing such as Web specifications without misunderstanding, but I always seem to botch something so that things are out of alignment and so forth in this or that browser--usually Internet Explorer.

    In summary, CSS is good, but it'd be better if all browsers actually followed the standards and interpreted any ambiguity the same way. That's all I want, so I can remain sane!

    --
    On vit, on code et puis on meurt.
  9. Avoiding Piracy by Eberlin · · Score: 5, Informative

    As an act of rebellion, I ran all my web pages through deCSS and now I've got the MPAA after me!!!

    On a more serious note, I do like CSS as it is very handy when it comes to making site-wide changes. The big thing about it, though, is that it has to be there from the very beginning. Not that planning is a bad thing, but when you inherit site maintenance from someone that apparently heard Frontpage was "da bomb" and those FONT tags are everywhere, it hurts.

    I'm still having problems doing positioning with CSS, but I figure that comes with actually trying it out and working through various browser issues. Tables are still a very convenient way to get layout going...and it's a bad habit that needs to be fixed.

    For anyone who's starting a web project, DEFINITELY look into CSS. Even though it's got a bigger initial time investment, it pays off greatly in maintenance. Especially when the marketeers ask for a blue that's 3 shades lighter than what you currently have on 100 or so pages.

  10. w3schools? by cexshun · · Score: 5, Interesting

    Not to be flamebait or anything. An honest question...

    What exactly does this book have that is not available at W3schools.com?

  11. CORE CSS TEAM by Anonymous Coward · · Score: 5, Interesting

    Someone for the love of god implement FLOAT MIDDLE

    I mean geesh, just give designers a bit of help with a small FLOAT MIDDLE syntax.

  12. Hybrid Layout by TrentL · · Score: 5, Informative

    The more sensible CSS zealots seem to accept the "hybrid layout" concept. It's OK to use a table here and there if CSS browser bugs are causing too many problems. But the days of tables nested 10 levels deep and spacer gifs and crap like that are gone.

  13. Re:CSS is crap for layout by Caleb+Rutan · · Score: 5, Informative

    Okay. Here's a couple:
    AOL.com - go ahead and laugh, but their site is classy and the layout is table-free.
    Sprint.com - ditto. They use tables, for tabular data, like their stock quote info, but that's what tables are *for*.

    Commercial sites, especially big ones, are deep and take a lot of work to redesign and recode. Most of those probably aren't being torn down and rebuilt with CSS because there isn't an enormous return in doing it yet. This doesn't mean it cannot be done, nor does it mean that if you're starting a new site, or re-doing an existing one, that CSS can't do the job.

    In fact, I'll bet it can. See the Zen Garden for a hundred or so examples of what can be done with only CSS.

    --
    -- caleb
  14. Where's the Review? by Quinn · · Score: 5, Insightful

    Am I the only one who feels as if this is only a teaser for a real review? The reviewer mentions a "table of contents below" and his "score" which I don't see. Have I just never noticed that there's some other link to click on to see a full review, or am I freaking insane, or wtf?

    --
    #19845
  15. Re:CSS is crap for layout by medeii · · Score: 5, Informative

    Yup. Wired certainly isn't a "big commercial website." Neither is ESPN, apparently. Or AOL, Inc.com, the PGA Open Championship, Sprint PCS, Phish.com, Quark.com, the U.S. Mercedes-Benz site ... the list goes on. Did you even think to Google for any of the myriad discussions about all of these sites switching to a better layout -- or did you just feel like pulling generalizations like "You won't find one." out of your ass?

    There are very, very few things that HTML can do, that CSS cannot -- and what's more, it's simple to design a site that works around those limitations. For every incompatibility or limitation CSS has that causes an extra five minutes of design headache, it saves fifty minutes through its simplicity.

    But, who am I to tell you that? Why don't you discover it for yourself? Start here.

    --
    got standards? --- http://www.w3.org/
  16. CSS sceptic turned believer by lone_knight · · Score: 5, Insightful

    Up to a few weeks ago, I would have laughed at the idea of CSS being used in serious web design for anything other than simple color and theme coordination. On commerical sites, CSS seemed the exception to the rule, and I scoffed at sites that used and tags to layout their page.

    But that was before I actually saw the power and wisdom of incorporating CSS.
    I recently updated my personal test site to use full CSS for the structure and design, and was very pleased to learn about the two key benefits of CSS website design: structure and format.

    Structure:
    For ages my own coding methods involved nested table within nested table, until the complexity of my pages got so complex that a simple updates became a gamble of helping or shredding the resulting page. Nested tables are also nearly impossible to coordinate for pages that must be scalable for accessibility, or simply stretching the viewable resolution for more modern video display sizes. Tables were originally meant for one thing: formatting text data, not carrying the workload of page structure. The truth is, it is much easier and precise to define a site's structure using CSS positioning. I am a minimist at heart when it comes to my source code, and CSS has not only helped to reduce clutter in my source code, but in most cases has reduced the source size by about 20%.

    Format:
    Using relative font sizes and design templates for formatting text not only makes universal page design easy, but it also makes browser loading faster, since CSS can be cached by local browsers while hard-coded or code includes must be reloaded every time the user clicks a link or refreshes the browser. That means reduced server load and increased load speeds for the user, too.

    Now I realize, CSS is not the end-all and be-all of web design. There are some weaknesses, and the typical cross-browser support that needs to be worked out. But for the serious web designer, you can't ignore the elegance and the design concepts that make CSS a very powerful (and in some cases, superior) design tool.

    If you are interested, the W3C site has some great CSS howto's and examples on replacing table-based structure on your site.

    --
    Computers are useless. They can only give answers. --Pablo Picasso