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.

82 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 chrisgeleven · · Score: 4, Informative

      For those who say CSS doesn't work right in IE or Mozilla, the CSS Zen Garden will prove them wrong. 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.

    2. Re:CSS Zen Garden by TwinkieStix · · Score: 4, Interesting

      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.

    3. Re:CSS Zen Garden by mattkime · · Score: 2, Interesting

      ...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.
    4. 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...

    5. Re:CSS Zen Garden by Anonymous Coward · · Score: 2, Informative

      From the CSS2 specification:
      "Pixel units are relative to the resolution of the viewing device, i.e., most often a computer display. If the pixel density of the output device is very different from that of a typical computer display, the user agent should rescale pixel values."

    6. Re:CSS Zen Garden by Laebshade · · Score: 2, Informative

      It's not that they're using a fixed width that is the problem, and the main reason they're using it is so users won't see it smaller than it really should be. Instead of using width (like I assume they're using) they should be using min-width. As the name implies, this would set a minimum width (as I use on my website's CSS.

      HTML is for structuring the document, CSS is for styling it.

    7. Re:CSS Zen Garden by Kozar_The_Malignant · · Score: 2, Insightful

      >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.

      Sheesh yes. This site also cranks my other pet peeve: contrast. Light grey text on white is hard to read, especially at smaller sizes. Here are some guidelines from Penn State:
      • Use a browser safe color palette (216 colors).
      • Use contrast. Dark text on pale background is better on a computer than light text on dark.
      • Avoid vibrating contrasts, especially red and green next to each other (color blindness) .
      • Use bright or different colors for emphasis.
      • Use the 3-Color Rule.
      • Never use colors from the opposite ends of the color spectrum together.
      Nothing like dark red, eight point type on a black background to help my eyes.
      --
      Some mornings it's hardly worth chewing through the restraints to get out of bed.
  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. A Roadmap to Standards by huphtur · · Score: 4, Informative

    Comprehensive, informal, and somewhat long-winded roadmap for anyone who has heard about web standards, thinks they might want web standards, but doesn't know where to start.

  7. 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 cexshun · · Score: 2, Insightful

      Not when css can be defined inline with

      <div style="color:red;"> </div>

      And if I see a <center> tag one more time, I'm going to explode!

    2. 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.

    3. Re:CSS, oh how I love thee... by Just+Some+Guy · · Score: 2, Informative
      I completely disagree. It's never easier to hardcode constants right into the middle of a block of code than to pull them into their own section, and that holds true for HTML, too.

      At some point, you will want to change that to <font color="blue"> (also note that quotes are mandatory in all recent versions of HTML); when you do, your definition of "easier" will change to be more like mine.

      --
      Dewey, what part of this looks like authorities should be involved?
    4. Re:CSS, oh how I love thee... by Neon+Spiral+Injector · · Score: 2, Informative

      Well "div" is a block level elment, you'd want a "span" in this case. Also the trailing ';' is not needed and actually invalid for the style attribute to a tag.

    5. Re:CSS, oh how I love thee... by Neil+Blender · · Score: 4, Insightful

      It's never easier to hardcode constants right into the middle

      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.

    6. Re:CSS, oh how I love thee... by ejaw5 · · Score: 3, Informative

      For anyone who maintains websites with a text editor (myself included) the value of CSS is greatly appreciated. As you've mentioned, all you have to do is edit one css file and you can change the appearence of a whole website, or at least all the pages that use that particular CSS file. The problem is with those using WYSIWYG editors like FrontPage and Dreamweaver who have no idea of CSS, or in some cases basic HTML for that matter. I've seen how Dreamweaver (4) handles page "themes". Make one change like change link colors, and then the software traverses through each and every file and makes the changes in them. Not very efficient.

      --

      $cat /dev/random > Sig
    7. Re:CSS, oh how I love thee... by Just+Some+Guy · · Score: 2, Insightful
      No, that's not very efficient at all, especially since it discards all semantic information. In other words, if you've chosen the same particular attribute for two unrelated entities, and you later want to change that property on one of the entities to something else, then you're going to have a heck of a time distinguishing between them.

      For example, suppose that you use red text to highlight error conditions in one part of the site, and red text to indicate mandatory form items on another part of the site. Later, you decide to change required fields to blue. With CSS, you edit the style for "td.mandatory", and every occurence of <td class="mandatory"> is instantly affected. Without CSS, you search for every match of "red" and decide whether or not to alter each one. Strangely enough, most employers aren't too thrilled with a 30-second change takes 3 hours.

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

      Well, actually, web design was meant to be was at browser level, allowing the user to alter the display to his own taste.

      Companies, such as the one you prsumable work for, and the desktop publishing people charged with putting forth official company documents weren't happy about that arrangement, so times have changed.

      That said, about two years ago I got my ass chewed out here for applying the old rules. Since that time I have come to appreciate CSS myself.

      I'm still not crazy about the web being "brochurified" though.

      KFG

    9. 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?
    10. Re:CSS, oh how I love thee... by Just+Some+Guy · · Score: 2, Insightful
      With CSS, the browser gets much more control over the final presentation by allowing the user to load locally-defined stylesheets that override remote settings.

      Our website is actually very, very simple by most design standards. I built it from the ground up to be extremely lightweight and "clean" so that our customers, who spend their days filling in forms and submitting them, aren't distracted by anything that wasn't explicitly designed to make their work more efficient.

      The huge win for us wasn't a gee-whiz-that's-amazing appearance; it was a well-structured architecture that we can build on and alter without tracking hundreds of embedded tags throughout the site. We don't do anything in CSS that couldn't be done directly in the HTML. We just do it far more efficiently than we could've otherwise.

      --
      Dewey, what part of this looks like authorities should be involved?
    11. Re:CSS, oh how I love thee... by bonkedproducer · · Score: 2, Interesting

      It's not hard in any of the major browsers to tell them to ignore the stylesheet of a site, or use your own - That's the beauty of CSS, even in a text-based, or non-compliant browser, you can degrade much nicer and still present content.

      Something you can't do when you use stuff like javascript etc. to present your "brochur-a-fied" web site. CSS gives the designer more power and more flexability, and a good standards compliant browser allows that without taking the power to "view it your way" from the user - much better than huge nested tables.

      I have sites that I rebuilt to be CSS/XHTML strict compliant after originally being built in tables, and saw file size reductions of 6KB (CSS) vs 24KB (tables/CSS hybrid) that could have a major impact of busy sites. AND, I began to get comments from those using screen readers etc. that the site was much easier to use. Plus, it is faster to recode one line of CSS than even an automated find/replace in any program I have tried.

      CSS shouldn't be feared or downed because it is different, it is an useful tool, and one that is more capable of doing what we want - remember ZEALOTS different isn't bad, it's just different, but then again, this being /. I'm sure there is some here that are mad that web sites aren't delivered via punch card, because that's what they used back-in-the-day and are still happy with.

      --
      Clothes make the man. Naked people have little or no influence in society - M. Twain
    12. Re:CSS, oh how I love thee... by JimDabell · · Score: 2, Insightful

      Ah, but <span class="error"> is far more semantic

      No it isn't. It might be a bit more useful in site maintenance, but it means nothing to anybody outside of your organisation.

      Replacing <font> with <span> is meaningless. Replacing it with an element type that actually means something, like <em> (emphasis) or <strong> (strong emphasis) would be productive. How useful is the meaningless <span> element type in situations where CSS is not used (Lynx, Google, etc)?

  8. 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.

  9. 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.
    1. Re:And Then There's IE by Tin+Foil+Hat · · Score: 2, Informative

      Unfortunately, simply knowing and understanding the standards just doesn't go far enough. You also need to know the most serious quirks of all of the major browsers. The W3C is not going to help you with that.

      Reading and understanding the W3C recs is good, even commendable, but it's only part of the equation. Tutorial sites can tell you things that the W3C cannot. Things like how Internet Explorer messes up the box model (your alignment promlem is most likely here), how IE 6 changed it, why it's still wrong, and what you can do about it. I pick on IE because it's easy, but there are various bugs and mistakes in all the other browsers as well, some of them are serious and can bite you in the butt. Tutorial and web design sites are good places to look for such information.

      Oh, and by the way, sanity is for wussies ;)

      --
      No matter how many of my rights are taken away, somehow I still don't feel safe. -Frigid Monkey
    2. Re:And Then There's IE by FatalTourist · · Score: 2, Insightful

      Same problems here... but Explorer Exposed! helps me quite a bit. Good listing of IE CSS bugs and work arounds.

      --


      Escape Pod Films: Sketch Comedy and Web Series
  10. 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.

    1. Re:Avoiding Piracy by telbij · · Score: 2, Informative

      FONT tags are everywhere

      Meet my favorite regexp:

      s!</?font[^>]*>!!ismg

      Good for dealing with other types of annoying tags as well. I export HTML from Excel all the time, but you wouldn't know it from looking at my pages.

    2. Re:Avoiding Piracy by arkanes · · Score: 3, Insightful
      CSS positioning is fundamentally broken. It's simply impossible to acurately recreate some of the stuff tables do, and even where it's not it's a (great deal) more work to recreate many simple layouts. Even something as simple as "center this element on it's parent" is impossible without absolute positioning.

      For styling CSS is da bomb. For layout, template based pages are at least as (if not more) maintainable, have the advantage of being cross-browser compliant (including text-based browsers), and are, in most cases, easier to understand and maintain. If you're going for pixel-perfect positioning, you'll want CSS though.

      The whole seperation of content thing is crap, though. The structure of the HTML still affects both the layout and the formatting, so there's no way you can get a totally clean break. Accept that fact that alterations to the sites HTML will require changes to the CSS and vice versa.

      The cross-browser issues are a real pain with CSS - it's worse than the hacks we all used back in 93 to make stuff render correctly. IE may be broken and non-compilant but it's still got the 80-90% market share and if you're doing any large-scale site it MUST render correctly on IE. That means giving up on a whole ton of CSS functionality, and especially if you're using it for positioning. One more reason to stick with tables for another couple years.

      Maybe CSS 3 will adress some of the issues. For the time being, I ain't real impressed. It's certainly a step up on font tags, but it's got a long way to go before it's usefull for positioning.

    3. Re:Avoiding Piracy by telbij · · Score: 4, Informative

      Even something as simple as "center this element on it's parent" is impossible without absolute positioning.

      Try margin: auto;

      Sure, you also need the parent to have a text-align: center for it to work in IE PC, but you'll usually have all your text in lower level block elements that can be defined with text-align: left to smooth things out.

      The whole seperation of content thing is crap, though. The structure of the HTML still affects both the layout and the formatting, so there's no way you can get a totally clean break.

      I definitely agree with this, though the only reason it really comes up is as a backlash against the horrendous practices that developed during the browser wars.

      The cross-browser issues are a real pain with CSS - it's worse than the hacks we all used back in 93 to make stuff render correctly. IE may be broken and non-compilant but it's still got the 80-90% market share and if you're doing any large-scale site it MUST render correctly on IE. That means giving up on a whole ton of CSS functionality, and especially if you're using it for positioning. One more reason to stick with tables for another couple years.

      The table hacks seem to make more sense, but in many ways I think it's just the familiarity that makes them seem better. Some of the CSS hacks ARE ugly, but a) there's a ton of stuff you can do without any egregious hacks and b) a little server-side IE detection can clean things up immensely.

      There is a ton of functionality that we do have to give up on for IE, but on the same token, there is a ton of stuff that works and is not possible using tables.

      I'm only concerned that my pages work in IE. Frankly, I'd much rather have them look better in Mozilla or Safari, to give Microsoft an incentive to further their CSS support. I've gotten several people to switch to Firefox after simply coming into my office and saying "wow, your web looks so much cooler!".

      I still do use tables for many common purposes (forms, certain types of alignment where floats break down, etc.), but now is definitely the time to start learning CSS-P techniques. Once you get a handle on some of the major IE bugs it gets a lot easier, trust me.

  11. Quality by justMichael · · Score: 4, Funny

    Write a book advocating the joys of CSS and then use a non standard cursor for the "a" tag ;)

    1. Re:Quality by nazh · · Score: 2, Informative

      yup, and they even got the wrong order of the psuedo-classes

      a:link
      a:visited
      a:active
      a:hover

      should be

      a:link
      a:visited
      a:hover
      a:active

      and they aslo use properitary css, speaking of the scrollbar "css". propitary css which is not properly marked with vendorname Vendor-specific extensions
      and to qoute w3.org: Vendor/organization specific extensions should be avoided

  12. 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?

    1. Re:w3schools? by Neil+Blender · · Score: 2, Funny

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

      A referer link?

  13. 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.

    1. Re:CORE CSS TEAM by telbij · · Score: 2, Interesting

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

      Considering the current problems IE has with rendering standard left and right floats, and the slow pace of new feature implementation, writing float: middle into the syntax would probably mean that you couldn't use it in Mozilla until about 2010, and you couldn't use it for public websites until 2020.

      Also, why do you want float: middle? Having text run around both sides of an block doesn't serve much practical design purpose (especially in a variable width/font-size environment). If you want to center something just use margin: auto;

      A much cooler feature would be alpha channel floats to make text run around more complex shapes.

    2. Re:CORE CSS TEAM by seney · · Score: 2, Informative

      Assuming this AC is talking about centering an element, this post is not "interesting".

      Yes, you can float: left; or float: right;, but it's not accomplishing just an alignment. It's taking the element out of the normal flow of a document. In order to align to the center set the margin to margin: auto;

      Zeldman's "Designing with Web Standards" is a wonderful book on CSS. I've read plenty and his was by far the best.

      http://www.zeldman.com/dwws/

  14. Almost by Hard_Code · · Score: 4, Informative

    Well, I went on a CSS bender and discovered that while it is great for pretty much all mundane styling problems, it still sucks when trying to layout content in table-like columns. Simple things like just getting a three column layout with various justifications, or getting divisions that occupy as little space as possible (since you can't tell it to "occupy as little space as possible" you have to rely on hacks like saying, "ok, bound yourself by margin parameters which eat up all empty space") is heinously difficult and requires bizarre hacks. I had to fall back on tables in some cases just to get a simple header including centered text with justified (left and right, respectively) flanking images.

    --

    It's 10 PM. Do you know if you're un-American?
    1. Re:Almost by gooser23 · · Score: 2, Informative
      I had to fall back on tables in some cases just to get a simple header including centered text with justified (left and right, respectively) flanking images.

      you mean something like:

      <div>
      <img style="float: left" .../>
      <div style="margin: 0 auto;">hello</div>
      <img stlye="float: right" .../>
      <div style="clear: both;"/>
      </div>

      It's not good enough to use CSS, you gotta make good use of CSS, and valid (X)HTML. It also helps if your target audience uses a standards compliant browser, which in my opinion is why most of the web still uses tables for layout -- its just easier than to deal with browser quirks.

      --
      "Dying tickles!" -- Ralph Wiggum
    2. Re:Almost by Laebshade · · Score: 2, Interesting
      You didn't look hard enough. The same CSS positioning I mention on my website using a combination of left, right, top, and bottom, along with overflow: {scroll|hidden|auto} and position: {absolute|relative}. You can view the CSS too. If you look at my site you will notice that the width for the content expands as the page expands in size but the width of the menu does not expand horizontally only vertically (as needed). It is very possible to do what you want to do. Here's what you need to do:

      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:
      <div id="header"><div id="img1">[image]</div><div id="htext">[text]</div><div id="img2">[image]</div>
      Then the CSS should look something like this:
      #header {
      position: absolute;
      left: 0;
      right: 0;
      }

      #img1 {
      position: absolute;
      left: 0;

      }

      #htext {
      position: absolute;
      left: 0;
      right: 0;

      #img2 {
      position: absolute;
      right: 0;
      }
      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.
  15. What in God's name...? by TrentL · · Score: 4, Informative

    From the book's website:

    The "CSS" in the title stands for "Cascading Style Sheets", a highly flexible way of formatting Web content. Core CSS, 2nd Edition takes a practical, pragmatic look at CSS, showing not only how you can make CSS1, CSS2 and Internet Explorer CSS extensions work for you now...

    I can't imagine a serious book on CSS talking about IE CSS extensions. People interested in this topic should get Zeldman's book, or the latest O'Reilly CSS guide by Eric Meyer.

    1. Re:What in God's name...? by arkanes · · Score: 2, Interesting

      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.

    2. Re:What in God's name...? by Quantum+Jim · · Score: 2, Insightful
      I can't imagine a serious book on CSS talking about IE CSS extensions.

      Why not? It is important to know what extensions are aviable for the major HTML engines (Opera, Gecko, KHTML, Tasman, and Trident) for several reasons. If you're writing software specific for a particular web browser, then it becomes extremely important to know about such engines. Or when most browsers support part of the standard, and a simple hack can add the other one to the list. Or when you're writing software to add some CSS support to IE (like Dean Edwards does in IE7). When is a little more knowledge ever a bad thing?

      --
      It is impossible to enjoy idling thoroughly unless one has plenty of work to do.
      - Jerome Klapka Jerome
    3. Re:What in God's name...? by JimDabell · · Score: 2, Insightful

      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.

      Perhaps the people at Microsoft should have gotten off their asses and finished implementing the six year old CSS 2 specification that they co-authored before coming up with proprietary add-ons. As it is, there are huge chunks of CSS 2 support missing or botched in Internet Explorer.

  16. Standard CSS or code for IE6? by dpilot · · Score: 4, Insightful

    But in the real world, how many people really try to code decent, standard-following web pages, and how many just code for IE6. Even if the job can be done the right way isn't it easier to be lazy and neglect everyone but IE?

    Are Gecko and Opera having a practical impact, yet?
    How about handheld devices?

    --
    The living have better things to do than to continue hating the dead.
  17. CSS is crap for layout by pubjames · · Score: 2, Insightful


    CSS is still often not a practical solution when creating a web site. Unfortunately there are many things that are just too difficult to do with CSS - and I mean relatively simple layout issues.

    CSS fanboys love to mock web sites that "still" use tables for their layouts. However, when you try to practically design a layout just using CSS and without tables, it proves pratically impossible. Even hardcore CSSers get all excited when they do simple things like layout pages in columns.

    Try and find a big commercial web site that doesn't use tables for their layout. You won't find one. Is it because the web designers that work for these big multinationals are dumbasses, as some proponents of CSS will tell you? No. It's because CSS is crap for layout. I wish it wasn't but it is.

    1. Re:CSS is crap for layout by pubjames · · Score: 2, Informative

      CSS is still often not a practical solution when creating a web site.

      Just to be clear - I'm talking about layout. CSS is great for font colour/styles etc.

    2. 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
    3. Re:CSS is crap for layout by t_allardyce · · Score: 2, Informative

      Not true, a div can be positioned anywhere with pixel, percentage or em/ex accuracy. It can overlap others, and basically do anything a table can do but better. The only reason you hear people spending hours on basic formatting is because they want to do it absolutely correctly, collapse well (which tables don't) and want it to work in all browsers (which would be made easier if browsers bloody well worked properly). If you don't care about W3C correctness, then a div can be positioned anywhere and anyhow, i cant see how your logic works: a div can be positioned anywhere like a table cell, but with the added advantage of being able to specify exact co-ordinates, its as simple as that, it can make use of all the same hacks and dirty work-arounds that tables can use if they want.

      --
      This comment does not represent the views or opinions of the user.
    4. 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/
    5. Re:CSS is crap for layout by Yosho · · Score: 2, Informative

      Neither Mozilla nor Opera's homepages use tables, but they do use CSS.

      --
      Karma: Terrifying (mostly affected by atrocities you've committed)
    6. Re:CSS is crap for layout by colinramsay · · Score: 4, Insightful

      Sorry, but you're stuck in the past. Think outside the box (model) and cast off your ideas of table based layouts. It's amazing how the web has become so inflexible in terms of design in such a short time.

      There are loads of good examples of CSS layouts that would have required huge nested tables to reproduce.

      I put it to you that table-based designs are holding back the imaginations of web-designers. The web-programmers are probably going to realise that soon. The reason why corporate sites are yet to realise that (but they are realising it - slowly but surely) is because - and this may be a shock - the majority of web people, like programmers, and many other professions simply do what they know; the easy stuff. The good ones learn new tricks and make the best end-products.

    7. Re:CSS is crap for layout by colinramsay · · Score: 2, Insightful

      But that's the problem - there *is* something wrong with using tables. It's a bastardisation of the entire concept of the semantic web, you're using a data container for something it wasn't designed for.

      Those sites I showed you are examples of well marked up sites - their HTML is clean and fast (mostly:). Yeah, you could do them in a table stylee, but they would all be heavier, harder to maintain and sematically poor. Those negative points are important to me - important enough that I would be prepare to aquire the skill necessary to create a CSS layout which bypasses them.

      Talking about CSS as a poor layout device is becoming increasingly lazy - there are some very clever people out there replicating the old ways of doing things, if that floats your boat.

  18. 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.

    1. Re:Hybrid Layout by happyfrogcow · · Score: 2, Funny

      The more sensible CSS zealots seem...

      Sorry to pick a nit, but since when are zealots sensible? Try,

      "The more sensible CSS proponents seem..."

    2. Re:Hybrid Layout by Just+Some+Guy · · Score: 2, Informative
      Now all you hear is "ooh tables are bad, all tables are bad"

      All tables are not bad

      First, I agree with your main point. I use a lot of tables on my website to display, well, tabular data. However, I haven't heard anyone say that using tables are bad. The usual assertion is that using tables for layout is bad. There's a subtle but important difference.

      --
      Dewey, what part of this looks like authorities should be involved?
  19. Gradients by thpdg · · Score: 3, Interesting

    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."

  20. Read the Recommendation by Milo+Fungus · · Score: 4, Interesting

    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?

    1. Re:Read the Recommendation by Neon+Spiral+Injector · · Score: 2, Interesting

      I learned XHTML from the DTDs. I thought I knew HTML, but was having trouble consistantly writing valid XHTML. Like does a "form" go inside a "p", or the other way around? After printing out the DTDs and keeping them in front of me for the next couple of sites I designed I learned a lot.

      And of course I learned CSS from the rec. also. I was reading over the SVG specs a couple weeks ago. But after coding up a few samples and seeing the state of SVG support (period, I don't care about which browser you use), I have put it on the back burner for now.

  21. Cool CSS version 3 features coming up by PurifyYourMind · · Score: 3, Informative

    The CSS3 Color Module includes an alpha value which can apply to all elements! I wonder how long it'll take browsers to implement it, though.

  22. Just Started This Weekend... by quantaq · · Score: 3, Informative

    I just started learning CSS this past weekend, and I love it. The review of this book seems rather serendipitous to me, then. And yes, w3schools is a great place to get started.

  23. 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
  24. site does not validate by chris_mahan · · Score: 3, Interesting

    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."

  25. Dreamweaver by mnemonic_ · · Score: 4, Informative

    Dreamweaver MX 2004 (which follows DW MX, which followed DW 4...) has excellent CSS support. It knows when to use div and when to to use span and has an easy interface for creating comprehensive CSS styles. It interprets CSS shorthand flawlessly. It has a convenient CSS reference. It also knows the difference between styles, pseudo-styles, and re-defining tags using CSS.

    The WYSIWYG can display CSS elements far better than GoLive or FrontPage, though I mostly use the Code view.

    Maybe you should try a more recent version of Dreamweaver. Also, you might be interested in the Dreamweaver Task Force which helped bring DW to greater standards compliance.

  26. For those to cheap to buy a book by ubergnome · · Score: 2, Informative

    I find this link useful http://msdn.microsoft.com/library/default.asp?url= /workshop/author/dhtml/reference/dhtml_reference_e ntry.asp

    Yes, I know we all hate microsoft -- but the reference clearly explains (at the bottom of each entry) whether the widget is CSS1/CSS2/IE-only compliant.

    I could do my job without a reference like this, but it's nice to have something to peek at when you start feeling insecure about your abilities

  27. CSS - Reality in my eyes by DroppedAtBirth · · Score: 2, Interesting

    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
  28. Why settle for second best? by veg_all · · Score: 3, Informative

    I haven't read this CSS book, but I've read a few, and the best ones always seem to have the same author. I can't imagine how one could be more clear and complete than Eric Meyer's Definitive Guide. He's also published a useful reference to CSS 2.0.

    --
    grammar-lesson free since 1999. (rescinded - 2005)
  29. 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
  30. excitement by mnemonic_ · · Score: 2, Insightful

    "Even hardcore CSSers get all excited when they do simple things like layout pages in columns."
    Indeed, not only because of the struggle involved, but because of the great flexibility in using CSS instead of tables. It's not just "thank god I made a nice layout with CSS, it took me 7 hours!" but also "thank god I made a nice layout with CSS, now I can adjust it much more easily in the future and have far greater control than with any table hacks." And they are just that; hacks. The table tag was originally meant only for displaying data in a grid-like format (keep in mind HTML was originally for scientific documents).

    And also we're all still learning. How many tablers got excited when they first figured they could use tables for page layout? A lot I bet. Now complex table layouts are all old-hat. Soon matured CSS layouts will be too, with the simplicity of layouts like this (check out the CSS, doesn't look too scary does it?).

  31. Re:crap for layout - NOT! (well, not entirely) by schodackwm · · Score: 2, Interesting
    but first... a word in favor of tables: they're NOT deprecated for tabular data, and DESPITE the "zealots'" insistence that they are inherently EVIL for layout, they ARE still "legal" there.

    ... 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
  32. Did I sleep through IE becoming complient? by Christianfreak · · Score: 4, Interesting
    Oh yeah it isn't.

    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:

    • No support for min-width, max-width. Wrongly treats the width property as min-width.
    • Can't clip background images to anything other than the body
    • Tons of just plain bugs related to padding, and boxes, incorrectly clips fonts, even full words in some cases
    • No support for :hover, etc on elements other than a making it impossible to do dynamic effects without Javascript
    • No support for overwritting classes (ie .class > .someOtherClass { })

    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)

  33. Re:crap for layout - NOT! (well, not entirely) by JimDabell · · Score: 2, Informative

    a word in favor of tables: they're NOT deprecated for tabular data, and DESPITE the "zealots'" insistence that they are inherently EVIL for layout, they ARE still "legal" there.

    The HTML 4.01 specification directly contradicts you:

    Tables should not be used purely as a means to layout document content as this may present problems when rendering to non-visual media. Additionally, when used with graphics, these tables may force users to scroll horizontally to view a table designed on a system with a larger display. To minimize these problems, authors should use style sheets to control layout rather than tables.

    It seems pretty clear that <table> elements aren't legal for layout purposes, with or without quotes around the word "legal".

    There are still issues: fonts are (render?) slightly larger in Moz 1.4 than in ie5.5 or 6.

    This is the web; font sizes will vary depending on a whole range of factors and if you are expecting any particular size, then you are doing something wrong.

  34. Excellent CSS tutirials by $exyNerdie · · Score: 4, Informative


    Since this discussion relates to CSS, here is a site with two excellent tutorials on CSS (bookmark it even if you don't use CSS now):

    - CSS Positioning (5 pages)

    - Using Style Sheets (7 pages)

    These two might help save you money on buying a CSS book

  35. why not XSL? by DrEasy · · Score: 2, Interesting

    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."
  36. Book's Author on Safari, IE Extensions, Etc by CaptMondo · · Score: 2, Informative

    Woo hoo - I've been Slashdotted. And with a decent review! ;-) Fourth book lucky I suppose...

    Okay, some explanations are in order for some of the questions I've run across:

    Why Safari isn't covered: Safari was only available as a pretty buggy pre-release version while I was writing the book, and it only became 1.0 during printing (figures). I didn't think it worthwhile to include information on this browser until it became more stable, especially since it was obvious that many of its CSS-related bugs were being worked out in successive beta releases. Instead I've covered that info in the Web site, which also includes info on more recent versions of Konqueror and OmniWeb to which it is related through a common rendering engine.

    Somebody mentioned that dealing with IE extensions was daft, and shouldn't be taken seriously. I decided to add them into this edition of the book in order to be thorough, and because somebody on Amazon had complained about the lack of any such listing in the first edition. The commentator is probably thinking about the various transition and filter effects thrown into the early editions of IE, which for the most part are about as useful as the beloved tag (they *are* covered however, at the end of the book). Far more interesting are the CSS extensions that have been added primarily for internationalization/localization issues. The CSS extensions Microsoft has added for dealing with things like Ruby layout for the Chinese-Japanese-Korean languages definitely should be taken seriously, as they are genuinely useful. What's more, many of MS' CSS extensions in this area have led the way towards what has become (or will likely become) the official standard. MS does get a basting for seriously jumping the gun on the W3C process, but if you want to starting working now on some CSS3-related code, there's plenty of IE extensions that lead the way that you can play with now.

    And my apologies to those who have run into the database errors on the book's supporting Web site -- this is now fixed. Turns out my ISP had changed servers on me, which was the original cause of the problem.

  37. <font> is just as useless in Lynx/Google by brownpau · · Score: 2, Interesting

    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.

  38. Borrowed from an reply I read earlier... by Denyer · · Score: 2, Informative
    "Designing for 90% of browsers is our policy? Here's a question. If I answered 10% of the sales calls with "hello [companyname], could you please fuck off", how would that affect our sales?"

    I realise you're just trolling, but it's a point that deserves to be beaten into the heads of as many web designers as possible: if that one in ten is a guy who doesn't see too well, who surfs from work in a browser his IT tech has locked down settings in, or whatever, if he is the one in ten who thinks "hey, these people are nice enough to cater to me" and buys the product... your unfriendly website just got its ass handed to it by the competition.

    Good designs work for everybody, and they give you a business advantage.

    --
    Ph-nglui mglw'nafh Gates M'dna wgah'nagl fhtagn.
  39. Re: is just as useless in Lynx/Google by JimDabell · · Score: 2, Insightful

    If this were XML, we could define an <error> or <important> tag

    You mean element type, not tag, and it would be just as meaningless. The rest of the web doesn't know anything about your markup scheme. Throwing the magic word "XML" at it doesn't change this. <span class="error"> doesn't mean anything to any program outside your organisation, nor does <error>. The whole point of using a shared markup language like HTML is that eveybody understands what the markup means and can do useful stuff with it.

    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.

    CSS is an optional component of the WWW; you are treating it as a required component. Using meaningless code and then being able to kludge a certain presentation so people can understand it is no better than using <font>.

    The value of CSS is that you can use meaningful markup without worrying about the presentation. If you don't bother using meaningful markup, then you haven't progressed at all, and may in fact be taking a step backwards (for instance, some people start using <div class="heading"> elements and similar).

    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.

    How is a search engine to know that things like <span class="important"> are important? They don't. They do, however, know that <em> elements mean emphasis, etc. The <div> and <span> element types should be used as a last resort, not in place of element types like <em>