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.
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?
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.
Not to be flamebait or anything. An honest question...
What exactly does this book have that is not available at W3schools.com?
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.
Almost every design on this site works with IE5+ and Mozilla. To see such beautiful, fast, standards-compliant, and workable designs not break for 95% of web browsers on the web today is quite amazing.
But not totally usable. I'm using Mozilla 1.6, and as soon as I try to increase the font size on most of the themes in zengarden, I get overlapping text. It's useless when running at high resolution.
...unless you have a mostly mac audience, in which case Mac IE 5 barfs on many of the designs.
Yes, yes, Apple now makes Safari, but its going to take a long time for the more clueless users to switch. (I know, I've tried...)
Know what I like about atheists? I've yet to meet one that believes God is on their side.
Has anyone else noticed the sudden rise of gradients and high-color icons and logos? They have begun appearing in huge numbers in webpages, software, and in new OSs. I installed Fedora Core the other day and was amazed by the beauty of it, but I wonder what the load is on the PC.
I remember reading this whitepaper in 2001 about how to do this, and why, and I wonder if it is powering the entire phenomenon.
With websites, correct layouts are even more critical to the look, and it looks like the techniques in this book would really assist with that.
-Patrick
"They never stop thinking about new ways to harm our country and our people, and neither do we."
I may be a bit strange in this, but I learned most of the CSS I know by reading theW3C Recommendation. I started reading W3C recommendations when I wanted to learn how to code SVG. Tutorials and examples were relatively rare on the web, so I just found the specification and went from there. I find W3C recommendations to be very readable, and I've since read the recommendations for CSS and every HTML since 4.0. My web design has changed dramatically (and my dislike for IE has deepened).
Has anyone else learned a web technology strictly from the specs?
The book's site doesn't validate, either. That isn't a huge sin in my book, but I see that the site uses named colors (black, gold, navy) for attributes. This is a no no.
88 errors in the html when validating with validator.w3.org/ in HTML 4.01 Transitional.
You'd think they would have done a better job, no?
Oh, and as someone mentioned before, css does not validate either.
"Piter, too, is dead."
For what it's worth, most of the IE extensions are usefull, and should be absorbed into the spec/implemented by other browsers. The ones I miss most often are overflow-x and overflow-y, but the layout options for non-Western character sets are neat too. According to MS, most (althought not all) of the extentions have been submitted to the W3C, so they should get off thier asses and add them to the spec so Mozilla devs can support them without feeling naughty.
I have never used only CSS to design a website solo for the fact it is still browser dependent. I find a good mix of common CSS, good old HTML, and common sense works best.
Rob
... that said, the time it took to absorb (for example) position: relative; top: -2.5em; was really worth while for (dayjob=webmaster) me. As one tutorial (sorry, can't recall which) pointed out, with css one can position elements on a page with single-pixel precision... and make that work across most browsers (ie>5.5, moz>1.3, recent NS, Konqueror, Opera).
There are still issues: fonts are (render?) slightly larger in Moz 1.4 than in ie5.5 or 6. And fonts that look fine in Moz or ie>5 at 1024x768 on a 'doze box (read: MANY of our customers) look dreadful at a different rez on some other OS's. Browser makers still don't use identical DOMs, which makes margin:auto; or padding-left: nn; unreliable.
So, for now at least, you still do have to run a pragmatic test for x-resolution, x-browser, x-OS anomalies. But -- IM(not so)HO, css doesn't deserve the kind of condemnation the parent and others offer. With a little study, one can work around most browser glitches...
[this sig has been trunca
Seriously there are so many bugs and missing stuff from IE's implementation even of CSS 1 I fail to see how anyone can claim that its even remotely complient.
Here's just a few things off the top of my head:
The list goes on! And don't even get me started on the implementation of the DOM in IE, not to mention the security problems and other 'features' that also come along with it.
Why oh why can't it just go away!? If you don't believe me, google for this stuff, its all out there complete with hacks to get around some of it (though most of htem use non-standard MS extensions)
The Anti-Blog
Bare with me, I'm not a web designer. I have a candid question: why not use XML + XSLT instead of HTML + CSS? This way you would completely separate content from presentation, and you could also generate tables or whatever floats your boat in the resulting HTML.
:)
I guess the two approaches aren't incompatible: you could use XSLT to generate an HTML document that makes use of CSS... OK I guess I answered my own question...
Comments?
"In our tactical decisions, we are operating contrary to our strategic interest."
If this were XML, we could define an or tag or even ; but this being X/HTML, we want to use id and class attributes to identify a line of text/code within given standards. The example given in parent, , usually means "error" or "important," so using class="error" or class="important" is far more meaningful to the coder than a deprecated tag, and can be made meaningful in any manner to the general audience with CSS.
>How useful is the meaningless element type in situations where CSS is not used (Lynx, Google, etc)?
- In Lynx, about as useful as the <font> tag, eh? But proper structure and hierarchical markup with headers, paragraphs, and properly identified <div> blocks will work wonders: making clear to searchbots what text is important, and giving disabled users an easily-navigable nonvisual UI. Then, the document can be easily (?) styled for prettiness in normal browsers, while still retaining an intelligible structure for other environments.
Even plain, unclassed <span> tags are useful when nested inside parent blocks, since these can be styled as descendant CSS selectors without suffering from acute classitis. Plus, <span> is standards-compliant, and <font> is deprecated.
Enclose the images and text in a div tags. Assign an id to the div so it can be identified in a external CSS file. Enclose each item - image, text, image - in a div tag too with an id to identify them. The HTML should look something like this:Then the CSS should look something like this:I haven't tested that but it should work. Of course you'll want to play around with it and modify it, but you get the idea.