Slashdot Mirror


The CSS Anthology

Bruce Lawson writes "I've read a lot of CSS books, but this one is the one I wished that I'd read when I was learning, and I suspect that other slashdotters may concur. It is firmly pitched at the coder rather than the designer, takes you from CSS virgin to upper intermediate level, with good attention to the process of (re)designing with CSS, legal issues such as Accessibility (section 508), and assumes that you're not scared of mark-up." Lawson offers this disclosure: "I should immediately disclose that I've worked for two different companies that have published the author, Rachel Andrew, but I have no connection with the publishers, or this book." Read on for the rest of his review. The CSS Anthology: 101 Essential Tips, Tricks & Hacks author Rachel Andrew pages 380 publisher SitePoint rating 8 reviewer Bruce Lawson ISBN 0957921888 summary Structured Q&A guide for CSS beginners

Author's credentials

Andrew is a long-term member of the Web Standards Project (WaSP) and programmer, technical project manager, technical team leader/senior developer and webmaster, according to her own bio.

Who's the book for?

The book's subtitle is somewhat misleading. There probably are 101 tips'n'tricks (I didn't count) but it's not the random miscellany that it implies. The information is structured so that a n00b could become proficient by reading the book from start to finish (I tested this out on a colleague). The tips'n'tricks structure does allow you to find what you're looking for in a hurry. The table of contents is easily scanned, and there is an excellent index.

The book doesn't offer advice on how to sex up the beauty of your site. That's fine for me; my current work involves replicating someone else's designs using xhtml and CSS, and as a coder I'm pathologically unable to design the type of showcases that you see at the CSS Zen Garden. A graphic designer might therefore find this book hard work; it jumps straight into a discussion of syntax, and there's occasional geek-directed statements (CSS supports multi-line C-style comments). Similarly, if you're completely new to html, this book probably isn't for you; there's lots of references to pre-CSS ways of working which could potentially be mystifying. Unusually for CSS books, there's a refreshing lack of polemic telling you why you should use style-sheets. If I read another history of the browser wars in a technical book, I shall scream.

So the book's constituency would seem to be those who know how to present information via html, and wish to take advantage of the smaller filesizes, greater flexibility and logical separation of the presentation layer from the mark-up that the (x)html/ CSS combination offers. The logical purity is my personal reason for moving to Web Standards; the trauma of writing text processing applications with VAX Fortran in the late '80s left me with the propensity to weep when I see html as sorely abused I mangled dear old Fortran.

Are you sitting comfortably? Then I'll begin.

Anthology kicks off in the conventional way for CSS books - controlling fonts and colours, styling hyperlinks, headings and the like. Each chunk is structured as a problem (How do I remove the indented left margin from a list?), a solution and sample code, and generally a discussion of related applications of the code, compatibility issues, accessibility notes etc. This is a pretty compact method of explication, and the basics of styling, syntax, pseudo-class order and the like are romped through in 40 pages, but not glossed over. The key to this is that Anthology assumes you know what you want to do, and shows you how to do it.

Chapter 4 (Navigation) is where the real meat begins - making navigation menus that are solely html unordered lists (because a menu is logically a list of links) and styling with CSS, adding rollover effects, styling navigation as buttons, changing the styling to a horizontal navbar, or even Amazon-style tabs without changing the mark-up. I suspect that, although these are techniques that can be found in most CSS books, the brevity and simplicity of the explanation will be revelatory to many. Chapter 5 (Tabular Data) may come as a surprise to those who mistakenly believe that web standards disallows the use of html tables, as it shows how to style tabular data - the examples are a spreadsheet and a calendar. Chapter 6 repeats the trick with that most mundane aspect of web development, the form.

Chapter 7 (Browser and Device Support) is about real-world CSS development. Unlike most books which instruct you to test in loads of browsers and leave it at that, this chapter lists all the main permutations of OS and browser (including tips on installing multiple versions of IE/ Win), and begins discussion of the tried and tested hacks to hide styles from Netscape 4, IE etc. All of this information is available on the web -- but for a newbie who isn't yet aware that it's possible to hide styles from certain browsers, it's a great way to introduce them to the murky practices of real-world CSS development. What's also refreshing in a computer book for n00bs is a discussion of how to seek help on lists and forums, with a guide to etiquette.

Chapter 8 (CSS Positioning and Layout) is where the stuff that stumps many a table-based designer begins. Along with fonts and colours etc, CSS can lay out the stuff on your page. I'm unsure about the success of this chapter; the Q&A structure is great if you're looking to build one of the sites that are explained (and the list is pretty comprehensive), but I came to the chapter hoping to cure a couple of bugs I'd found in a project I'd previously semi-successfully laid out with absolute positioning (A.P.).

Generally, I layout using floats as I also write the html, so it's easy to ensure that the markup spits out <div>s (sections) in the left-to-right, top-to-bottom order that I want to lay them out in. Suddenly, I had two projects that required A.P. for the first time, as it was not cost-effective to change the way that the client's CMS spat out the markup, so AP was required to position sections on the page regardless of where they appeared in the markup.

Anthology served me fine until I tested the page in IE and the layout was off. Nothing in the book gave me any pointers, and in the end I gave up Googling and just used a hack which exploits an IE parser bug to serve different co-ordinates to IE, after finding the hack co-ordinates through trial and error:

#APthing {position:absolute; top:34px; left: 758px; width:108px; height:88px;}
* html #APthing {position:absolute; top:19px; left: 785px;} /*for IE */

OK, so there may be a simple mistake I'm making -- but then, as far as absolute positioning goes, I'm the kind of newbie at whom this book is aimed, and I imagine that others will make the same mistake that I did. If the book had explained where I was going wrong, or given me the above hack, I'd've spent less time with Google and more time with Guinness.

Chapter 9 (Experimentation, Browser Specific CSS and Future Techniques) is successful, except for one small gripe. I'm glad that the author, although a member of the Web Standards Project, isn't an uber-purist. (I'm of the opinion that a little invalid code, if it's the only way to get the job done, isn't a hanging offense). So she shows how to implement IE-only proprietary CSS that can make colourful scrollbars, should you wish to do this. There's also a Mozilla-only CSS trick to allow curved edges to CSS boxes, which I implemented on my homepage that very evening.

However (here's the gripe), the most useful technique shown is one which allows fully-CSS flyout menus that don't rely on JavaScript. The author notes that it won't work for most people, as IE incorrectly restricts the hover pseudo-class to <a> tags only, while the CSS requires hovering over <li> elements.

Well, Yes and No. There's a well-documented and elegant hack which allows a proprietary Microsoft behaviour to be attached to the CSS that attaches a small JScript that corrects the IE bug, and thus allows this extremely useful CSS-only flyout menu to work in IE. I've used the technique myself when required to mimic the look and feel of a client's site while making it DDA/ADA accessible, and it works perfectly. To me, the omission of the IE hack from Anthology is an unfortunate oversight.

Summary

There's a couple of flaws in the book, though I suspect that in order to explain them, I've over-emphasised them. All in all, it's a solid, professional no-B.S. way for someone with a code-oriented mind to get them up to speed, satisfactorily and quickly; a motivated reader could be churning out standards-compliant, bandwidth-friendly sites after a few hour's experimentation. Ordering the book from the publisher's website was a good experience and, unusually, they have a money-back guarantee. As I said, I wish that I'd had access to Anthology when I was learning.

You can purchase The CSS Anthology: 101 Essential Tips, Tricks & Hacks from bn.com. Slashdot welcomes readers' book reviews -- to see your own review here, read the book review guidelines, then visit the submission page.

169 comments

  1. Ok, let's take up a collection by wowbagger · · Score: 5, Funny

    Ok, let's take up a collection for Rob et. al. to get this book....

    1. Re:Ok, let's take up a collection by The+Ancients · · Score: 5, Funny
      Small steps.

      We need to get them help with their spelling and grammar, first.

    2. Re:Ok, let's take up a collection by Anonymous Coward · · Score: 0

      Small steps.
      We need to get them help with their spelling and grammar, first


      Some sort of dupe control before that.

    3. Re:Ok, let's take up a collection by The+Ancients · · Score: 1
      Some sort of dupe control before that.

      As I said - small steps.

    4. Re:Ok, let's take up a collection by Anonymous Coward · · Score: 2, Informative
      It's been done, but because it "won't scale" or some other bogus reason, it will never happen.

      I guess it's just easier to block the W3C validator instead.

    5. Re:Ok, let's take up a collection by Anonymous Coward · · Score: 0

      it's a cool book Clothes

  2. Tables... by future+assassin · · Score: 1, Funny

    layout 4 life.

    --
    by TheSpoom (715771) Uncaring Linux user here. I have nothing to add to this but please continue. *munches popcorn*
    1. Re:Tables... by Anonymous Coward · · Score: 0

      This book review has been pwnt already!

  3. Learn online for free by Anonymous Coward · · Score: 2, Informative

    The added bonus of the online tutorials is that you can see the code in action and edit it yourself as you go. Not sure who would plonk down good money when so many thorough tutorials are online.

    1. Re:Learn online for free by Gorffy · · Score: 1

      feel free to point us to a few really, really in depth tutorials online, as I've yet to find one.

    2. Re:Learn online for free by Khuffie · · Score: 2, Informative
      http://www.alistapart.com.

      Might not be newbie friendly, but its got an extensive list of resources.

    3. Re:Learn online for free by gardyloo · · Score: 1

      Not sure who would plonk down good money when so many thorough tutorials are online.

      I would. I keep going through monitors like crazy. IT says I'm not supposed to underline things with ballpoint on the screens themselves. Anyone have some soft #1 pencils they can send me?

    4. Re:Learn online for free by someonewhois · · Score: 2, Informative

      Hey look, w3schools teaches it for free too! And look, they're linking to another Sitepoint book...

    5. Re:Learn online for free by Anonymous Coward · · Score: 0

      What is this amazing and mysterious "IT" you speak of?

    6. Re:Learn online for free by Anonymous Coward · · Score: 0

      I would. I keep going through monitors like crazy. IT says I'm not supposed to underline things with ballpoint on the screens themselves. Anyone have some soft #1 pencils they can send me?

      It's so sad when technology has to be explained to Slashdotters. If I were to have the desire to mark up a web page, I would use my copy of Adobe Acrobat to suck down the site as a single PDF and use Acrobat's markup tools to underline, highlight, cross out, circle, and annotate at will. Heck, I could pass the document around and we could see everybody's notes in the same document, and unlike a paper book, we could instantly all have copies of each other's notes.

      But keep marking up those monitors if it makes you comfortable.

  4. I like it.... by ZiZ · · Score: 5, Interesting

    It is one of the few CSS resources I've found that assume that you know what you're doing except where CSS is concerned, and doesn't try to teach you inane things like how to make a link to another document. I've got a copy that's rapidly becoming worn and well-used.

    --
    This flies in the face of science.
  5. Good review, but... by fiannaFailMan · · Score: 5, Insightful
    as a coder I'm pathologically unable to design the type of showcases that you see at the CSS Zen Garden
    I wish people would get out of this mindset that you must be either a coder or an artist and never the twain shall meet. I work quite comfortably on both sides of that fence and I have met plenty of renaissance people in this industry who are just as comfortable with code as they are with a graphic design tool like Photoshop. It's that kind of thinking that leads to the most creative solutions IMHO. Back in the days of Leonardo DaVinci there was no Berlin Wall seperating technical and creative people, it's a relatively recent addition to our culture and a bit of an unhelpful one.
    --
    Drill baby drill - on Mars
    1. Re:Good review, but... by Anonymous Coward · · Score: 0

      I think it's fine to have an itch and scratch it, in the CSSZenGarden sense, but I think it does take a Graphic Artist to make it look good.

      Having has to sit through a couple of website design discussions as an innocent bystander, I wanted to scream as people dickered over whether 0xCCFFEB was better than 0xCCFF8B for a background color, because I'm of the mindset of, "well, you haven't given them any option on it, so they'll be none the wiser, just pick one of them, dammit!", but I kept my mouth shut.

      I'm of the "coder" mindset. Sure, I can help lay the technical foundation, but don't ask me to make it pretty, all by myself.

    2. Re:Good review, but... by Anonymous Coward · · Score: 0

      I've read when I was learning, and I suspect that assumes that you must be either a coder or an artist and "never the twain shall meet". I work quite comfortably on both sides of this but must disclose I work most comfortably with legal issues such as Accessibility using a graphic design tool like Photoshop. It's that kind of nonsense that leads to the published the author, Rachel Andrew, but I have no connection with the process of (re)designing graphics code as they might be with CSS. I'm assuming that they're not scared of mark-up. Lawson offers this disclosure: "I shouldn't be here." You should consider doing the same.

    3. Re:Good review, but... by fuw · · Score: 4, Insightful

      I don't know about that. Myself being more skilled in the programming area, I find I have a very difficult time creating a site that I would consider "professional looking". I mean, I love CSS and have jumped head first into creating CSS-based layouts several years ago. My problem however, is not having the "design eye" that gives folks the ability to create such beautiful designs that you often see in CSS Zen Garden.

      Sure, I *want* to create a well designed site, but until I get that knowledge (school) it just ain't going to happen (not for me, anyway).

      > I work quite comfortably on both sides of that fence

      It's easy to say that about yourself, sure I even would try to claim that one. But when I look at sites I have created and compare them to sites done by a *real* graphic designer (web designer), there *is* a huge difference.

      I'd consider myself a professional programmer and an amatuer designer at best.

    4. Re:Good review, but... by poot_rootbeer · · Score: 1

      I have met plenty of renaissance people in this industry who are just as comfortable with code as they are with a graphic design tool like Photoshop. It's that kind of thinking that leads to the most creative solutions IMHO.

      And, most of the time, user interface issues should not be solved with the most CREATIVE solutions, but rather with the most PEDESTRIAN solutions. Users shouldn't find any surprises in the interface of your site or application -- it should look and feel just like all the other sites and applications they're already familiar with.

      Yes, back in the days of Da Vinci design and engineering overlapped quite a bit. And we all remember how well his helicopter designs functioned, right?

    5. Re:Good review, but... by Anonymous Coward · · Score: 0

      You mean we should all go back to Win3.x, CUA and Motif-based designs, or do you want even more pedestrian than that, like, say, IBM 3270 terminal emulation, one screenful at a time?

      There is always room for a *little* differentiation and change, but not a lot. And it's subjective for everyone.

      WordPerfect was very successful because what one learned in previous versions generally carried over into newer ones, all the way down to the keystrokes and macro commands.

      But WP couldn't really compete in the Windows UI environment, when it mattered most.

      And eventually, doing everything with the mouse became the "common man's tool", not memorizing all the keystrokes, and WP has essentially become irrelevant.

      I guess I'm thinking of not switching verbs on the same action, even if the "new" version does "lots more Better!". File->Find should have stayed File->Find. Sure, the semantics of the command is that it's Searching for things, but, dammit, I want to Find it.

      I can't wait to see all the funny little isms that get broken or transmorgified when Longhorn is unleashed upon the world.

      "You thought you 'knew' computers, eh? Well, guess what? You don't know $hit!"

    6. Re:Good review, but... by fiannaFailMan · · Score: 2, Insightful
      I don't know about that. Myself being more skilled in the programming area.....
      I probably should have explained myself a bit better. The point of my original post was that there are people out there who make good designers and good coders at the same time, regardless of what you personally as an individual are good or bad at. It is possible.
      --
      Drill baby drill - on Mars
    7. Re:Good review, but... by fiannaFailMan · · Score: 1

      Huh?

      --
      Drill baby drill - on Mars
    8. Re:Good review, but... by Anonymous Coward · · Score: 0

      I think you know what I mean...

    9. Re:Good review, but... by fiannaFailMan · · Score: 1
      user interface issues should not be solved with the most CREATIVE solutions, but rather with the most PEDESTRIAN solutions. Users shouldn't find any surprises in the interface of your site or application -- it should look and feel just like all the other sites and applications they're already familiar with.
      I'm confused. How on earth do you get "bad interface design" from "creative solutions? I never even mentioned interfaces, I was talking in general terms about design. In any case, a rennaissance man is more likely to produce a more usable interface. Get a pure designer to design a user interface and you frequently get stuff that looks like a million dollars but well nigh impossible to use. Get a pure coder to produce an interface and it may work but it'll look like crap.
      back in the days of Da Vinci design and engineering overlapped quite a bit. And we all remember how well his helicopter designs functioned, right?
      The technology to provide enough power did not exist and the basic aerodynamics and mechanics of helicopter flight were unheard of to say nothing of being understood. His designs were still pretty creative for their time though, wouldn't you say? And his work in the Sistine Chapel wasn't bad either.
      --
      Drill baby drill - on Mars
    10. Re:Good review, but... by fiannaFailMan · · Score: 1

      Actually I haven't a clue what you're trying to say. No offence, but I can't understand you.

      --
      Drill baby drill - on Mars
    11. Re:Good review, but... by Anonymous Coward · · Score: 0

      OK, I try again. Myself being more skilled in the programming area, I find I have jumped head first into creating a site that one time. But when I look at sites and applications they're already familiar with, well you get the picture. Yes, back in the programming area, I find I have created such beautiful designs at best. And, for most creative solutions, users shouldn't find I have created CSS-based layouts several years ago. My problem however, is not having the "design eye" that I did. If the book had explained where I was going wrong, or given me the ability to claim what you often see in CSS Zen Garden... It's easy to say that I did, half the time or most of the time with too much Guinness. I don't know about that. Myself a professional in programming area, I find I have a very difficult time with the most accessible solutions, but rather with the most of the book is aimed, and I imagine that I did. If the book is aimed, then I imagine that I would try to claim that one. But when I look and feel just like all remember how well those other sites functioned, right? OK, so you maybe make a simple mistake in the ability to claim what you often see in CSS Zen Garden. It's easy to say that I would consider you "professional designer and an amateur programmer at best". What you think there, renaissance man?

      Oh, and happy Iraqi election day.

    12. Re:Good review, but... by sv0f · · Score: 1

      I wish people would get out of this mindset that you must be either a coder or an artist and never the twain shall meet.
      [...]
      Back in the days of Leonardo DaVinci there was no Berlin Wall seperating technical and creative people...


      I accept "coder" and "technical" as synonyms for the purposes of this discussion, but not "artist" and "creative."

    13. Re:Good review, but... by Anonymous Coward · · Score: 0

      i think its funny that html monkeys consider themselves "coders"

    14. Re:Good review, but... by version5 · · Score: 1
      ...user interface issues should not be solved with the most CREATIVE solutions, but rather with the most PEDESTRIAN solutions.

      Not really. The majority of UIs out there are plain awful, so the most pedestrian solution is usually a very bad one. Because each application presents different information, different types of information, different levels of detail, differently-sized data sets and different kinds of end users, each UI should be creatively designed to accomodate all of this variability. If you are saying that people shouldn't re-invent the wheel I agree, but that is not the same as saying that they shouldn't be creative, any more than saying people shouldn't write perl scripts in assembly takes the creativity out of that.

      Not re-inventing the wheel doesn't mean that creativity is out, only that things that work should not be changed. Unfortunately, people are accustomed to awful UI design, but what works for them is almost incomprehensible to a new user. In most cases, I think you gain more users than you lose by using good, creative UI that fits well with people's most natural way of interacting with data, and doesn't force them to interact in ways that are only natural to a computer.

      --

      "It's Dot Com!"

    15. Re:Good review, but... by aardwolf204 · · Score: 1

      that always made me laugh too. but what do you think about "php coders"?

      --
      Im dreaming ofa big bndwdth, That can resist the /.crowd.May ur days b merry & bright & may al
    16. Re:Good review, but... by Anonymous Coward · · Score: 0

      Got news for you, I make a living at graphic design, been doing it for years, I know my css, my html, my javascript, what have you, but I have yet to meet a real programer that is good at design.... feel free to prove me wrong.... post a link.

    17. Re:Good review, but... by Huogo · · Score: 1

      I know PHP coders get a bad rap, but what do you consider to be a better language for web sites? Perl can be so horribly convoluted and hard to maintain, and most hosts don't support something like JSP.

    18. Re:Good review, but... by Anonymous Coward · · Score: 0

      I'm not sure what a better language is for websites. All I've got in my netdev toolkit is html, css, php, mysql. i've never tried jsp because like you said its hard to find a host.

      i was saying that some people dont consider PHP "coding" and compare it to writing HTML. While I believe a simple PHP script can be added to an .html file to display the date or something insignificant, when you really get into it I believe PHP, is coding the same way C++ is coding.

    19. Re:Good review, but... by stevey · · Score: 1

      Have you seen the Open Source Web Design site?

      I've used a few of their templates on my sites and it helped me a lot, both in terms of getting a good design, and in letting me look at a lot of sites all together and view their source.

      For example this Debian site was put together by combining elements from two designed I liked, whilst this one was pretty much a stock copy.

      I wish I'd seen the archive before I put together my homepage ;)

    20. Re:Good review, but... by fuw · · Score: 2, Insightful

      Yeah, but 2/3 of those sites are built on table-based layouts (old school methods). If you're reading a CSS book or already know CSS (for creating layouts), then you're not doing table-based layout.

      Not to raise the hair on your back, but I wouldn't call any of those sites "good design". While they might be very usable and well-structured (not the markup), it doesn't take long to realize that they weren't created by somebody with a background in graphic design. Just compare to any of the sites in the CSS Vault.

      Or if you want a similar theme, check out Red Hat or Suse (Novell).

      I just took a closer look at the Open Source Web Design site, I like that idea. I can't help but think that they need to implement one of their templates on their own site.

    21. Re:Good review, but... by Anonymous Coward · · Score: 0

      I hope you won't take this the wrong way, but it's impossible to understand what you're trying to say. Maybe you'd find it easier to communicate in English if you took some classes or read some English literature. Again, I'm not trying to be condescending; I'm just offering a suggestion.

    22. Re:Good review, but... by Monkeyman334 · · Score: 1

      Glad you like my site :D

      We just wanted people to be able to put up content without having to worry about the design. But yes, a lot of people just look at templates to learn.

    23. Re:Good review, but... by Anonymous Coward · · Score: 0

      Do english literature read - James Joyce: Portrait of the Artist, Ulysses. William Faulkner - Go Down Moses

    24. Re:Good review, but... by Anonymous Coward · · Score: 0

      I just imagined Slashdot commentary overrun with Joycean streams of consciousness, and shuddered. Then I realized it's been that way since day one.

    25. Re:Good review, but... by Monkeyman334 · · Score: 1

      I let the artist decide the layout, then I wrote the code for it. He wanted 2 columns side by side with the column on the right dictating the height of both columns. I also needed it to work back to IE5.

      I used divs/css where possible, but sometimes css doesn't cut it, and I'll use it when it does. Oh, and if you think it's old school to use 3 tables in a layout, then you're either too young or too naive to remember what old table based layouts used to look like.

    26. Re:Good review, but... by fuw · · Score: 1

      > but sometimes css doesn't cut it

      Sorry to break it to you, but there are thousands of web developers who can create table-less layouts. It's just a matter of learning how to do it. I will admit it is a difficult transition to make coming from a table-centric background (we all have come from that background), but once you learn the methods to create a 2-column or 3-column layout exclusively with containers (div) and CSS, you will not want to touch a table-based layout again.

      > then you're either too young or too naive to remember what old table based layouts used to look like

      Actually I used to create layouts exclusively with tables, it was the norm and it was what worked. I just happen to think table based layouts create bloated HTML and end up binding your content to a specific layout. With a CSS based layout, you can change the entire look and feel of your site with one file.

      > I also needed it to work back to IE5

      All my CSS based layouts look the same in IE5 as they do in IE6, Mozilla, etc. All you need to know is the hacks to put in your CSS to get it looking good.

    27. Re:Good review, but... by Monkeyman334 · · Score: 1

      CSS doesn't cut it, period. I know how awesome CSS based layouts are, that's why I used 90% divs. Check out the browse page, each "design" is a div and the layout is fluid. Something not possible with tables, I love that. Still, how I get it so that I can have 2 divs side by side where the column with the most content will decide the height of both columns. Tell me that I will move to a tableless layout. I can't even figure that one out in gecko based browsers, let alone IE5.

      I understand the modifiability bonus. Although I have a site wide template (PHP template system) for the layout and have the features you're talking about without css. Although I still use styles/classes for my tables because of bandwidth savings and some modifiability.

      Basically, I'm going to let the artist decide the layout. I'm not going to tie my hands behind my back and use a different layout because someone doesn't like tables. None of my site visitors have ever made a complaint about tables.

      But really, if you have a solution to my css problem please tell me. I'm not being sarcastic when I say that I will switch when I get a solution that works on IE5, IE6, and gecko. That's why I haven't switched, not because of ability limitations.

    28. Re:Good review, but... by fuw · · Score: 1

      I am sure there is a solution out there, there's pretty much a CSS alternative to every table-based layout I've seen.

      There is stuff like http://www.bluerobot.com/web/layouts/, or http://www.csscreator.com/version2/pagelayout.php (which I've never used).

      Basically, the key to a CSS based layout is liberal use of floats or absolute positioning. I tend to prefer floats because the render better across a wider range of browsers.

      The problem you desribe of having the column with the most content determine the height of all columns is a common one. From my experience, I have found that using floats within floats will solve your problems.

      The basic idea would be something like...

      #container{
      float:left;
      }
      #sidebar{
      float:le ft;
      width:200px;
      }
      #content{
      float:left;
      widt h:400px;
      }

      <div id="container">
      <div id="sidebar"><p>this is content, it could be long or short</p>
      </div>
      <div id="content">
      <h2>This is the main area</h2>
      <p>This is my content area, it could be longer the side column or shorter</p>
      </div>
      </div>

      This hasn't been tested and isn't guaranteed to work, I just know that I've done something similar to the above. IE5 actually renders floats and stuff pretty well, that's why I like them so much.

  6. CSS is annoying by Capt'n+Hector · · Score: 3, Interesting
    Kinda OT, but I wanted to get this off my chest: Is there (shouldn't there be) a way to replace this:

    a.blue {
    color: blue;
    }

    span.blue {
    color: blue;
    }

    div#back {
    color: blue;
    }

    With...

    color: blue {a.blue, span.blue, div#back}

    It fits more with the philosophy that colors and other styles should be in once place and one place only. CSS follows that OK right now, that is, we can put all those things in the same document, but wouldn't it be great if the document itself adhered to the same principle?

    That problem seems to me one of the biggest in CSS. It makes things cluttered, take up 10 times as much space as they otherwise might, and makes for an illogical thought process. The designer doesn't think: I'll go through each element in the page and make them blue, but rather: I want this this and this to be blue. Anyway, just a thought.

    --
    Quid festinatio swallonis est aetherfuga inonusti?
    Africus aut Europaeus?
    1. Re:CSS is annoying by Anonymous Coward · · Score: 0
      a.blue, span.blue, div#back {
      color: blue;
      }
      Better?
    2. Re:CSS is annoying by Anonymous Coward · · Score: 3, Informative

      Yes, it's called grouping. You have your syntax backwards, though. It should be like this:

      a.blue, span.blue, div#back {color: blue;}

      Of course, you don't really need a.blue and span.blue. A simple .blue would work.

    3. Re:CSS is annoying by Anonymous Coward · · Score: 0

      Well...

      You could just say .blue {
      color: blue;
      }

      and it works for most tags (div, span, etc), so their example is kind of silly. Don't get me wrong, I have many complaints about CSS, but I wish they would use better examples sometimes...

    4. Re:CSS is annoying by Vaevictis666 · · Score: 5, Informative

      You've got two options:

      .blue {
      color: blue;
      }

      and have it apply to anything with a class="blue", or

      a.blue, span.blue, div#back {
      color: blue;
      }

      to explicitly declare them. The commas being key in this one.

    5. Re:CSS is annoying by vondo · · Score: 1
      How about

      a.blue, span.blue, div#back { color: blue; }

      which works just fine? I'm fairly new to CSS, but it seems to me it's missing CPP-like definitions to allow propagating colors and such into more complicated structures.

    6. Re:CSS is annoying by ravenspear · · Score: 1
      Why not just do:
      a.blue, span.blue, div#back { color: blue; }
      That does the same thing and takes up less space.
    7. Re:CSS is annoying by gordon_schumway · · Score: 1

      a.blue, span.blue, div#back { color: blue; }

      --

      Ha! I kill me!

    8. Re:CSS is annoying by protagon · · Score: 1
      wouldn't
      a.blue, span.blue, div#back {color: blue}
      do the trick? I started learning CSS 3 days ago... wish I could afford that book. I've found westciv's site a good place for beginners. http://www.westciv.com/style_master/house/tutorial s/index.html/
    9. Re:CSS is annoying by Anonymous Coward · · Score: 0

      first, it is a bad classname because the point is to separate concerns. What happens to your HTML when the L&F needs to be orange?

      But, yes, you can do: .note, #back {
      color:blue;
      }
      or

      a.note, span.note, #back {
      color:blue;
      }

    10. Re:CSS is annoying by Tablizer · · Score: 0

      Why we are on the topic of complaints, why the hell do we need Yet Another Language for all this? What is wrong with extending HTML or XML rather than create a whole new goofy syntax for esthetic info?

      It makes writing and using parsers doubly complex, for example. Pick one and stick with it, dammit. Maybe Lispers were right: Go with Ess Expressions. But since most use HTML already, I vote for extending it instead of the CSS syntax.

    11. Re:CSS is annoying by justMichael · · Score: 5, Insightful

      The problem with using a color name in your class definitions is about 2 minutes before the site is complete they decide all the blue stuff should be green and now you have blue that's really green.

      Name them for what they are, not what they look like. Somewhere down the road you'll be glad you did. ;)

    12. Re:CSS is annoying by Zocalo · · Score: 1
      What's wrong with using the following?:
      a.blue, span.blue, div#back {
      color: blue;
      }
      That fits more with the approach of applying formatting to elements anyway. You could then follow that with further refinements like this:
      a.blue {
      font-weight: bold;
      }
      to emphasise links without effecting "span.blue" and "div#back".
      --
      UNIX? They're not even circumcised! Savages!
    13. Re:CSS is annoying by Mattintosh · · Score: 1

      According to this book you can already do that, albeit in slightly different form. Try this:

      a.blue, span.blue, div#back {color: blue;}

      It's on page 3.

    14. Re:CSS is annoying by Anonymous Coward · · Score: 0

      Um... You can do that-

      span.blue, a.blue, div#back {color: blue;}

    15. Re:CSS is annoying by Photon+Ghoul · · Score: 1

      propagating colors

      What does that mean? Does the "Cascading" part of Cascading Style Sheets not cover that?

      (Seriously, I'm not sure what you're asking)

    16. Re:CSS is annoying by teneighty · · Score: 2, Interesting

      I disagree.

      What CSS *really* needs is variables. For example:

      $border_color: #ccc;

      div.foo
      {
      border: 1px solid $border_color;
      }

      div.bar
      {
      border: 2px solid $border_color;
      }

      Having variables like this would cut down on a lot of the maintenance headaches that CSS can cause.

    17. Re:CSS is annoying by Anonymous Coward · · Score: 0

      CSS(2) can be tedious to deal with.

      I generally displace my CSS to at most 2 files: one for color and textual formatting, and another for structure (padding/margins/alignment/etc). My applications are always multi-style capable, and styles are different usually only by colors, images, and font changes--thus only 1 CSS file need be changed.

      While this makes editing styles easier, I agree with parent in that attributes like colors/fonts should support a scope association syntax with the various selectors. More generalization the better.

    18. Re:CSS is annoying by Scott+Laird · · Score: 1

      You're about 10 years too late for this discussion. CSS has been a part of the standards landscape for around a decade now, and it's been bog-common for at least a few years.

    19. Re:CSS is annoying by Macrobat · · Score: 1
      You can make a list of selectors use the same style, e.g.:
      h1, a, hr {
      color:blue
      }
      I'm not sure what your example means, though. Do you have a class or div called blue? That seems like a misleading choice of variable names. Sort of like creating a typedef of float called Int.
      --
      "Hardly used" will not fetch you a better price for your brain.
    20. Re:CSS is annoying by vondo · · Score: 1

      I'd like to be able to do something like
      #define BGCOLOR red;
      somewhere in a CSS and then be able to use
      color: BGCOLOR;
      at various places in the CSS file(s) rather than gathering everything together in one place like the parent example. Sometimes it can be a pain to find everything and if you have styles for an element other than "color:" it doesn't save space to write them all together.

    21. Re:CSS is annoying by Spy+der+Mann · · Score: 1

      With...

      color: blue {a.blue, span.blue, div#back}


      You got it backwards.

      a.blue,span.blue,div#back { color:blue }

      Also, you can specify classes more than once in a stylesheet. I use this to separate my stylesheets in two: Operational (margins, positioning width, etc), and Presentational (color, border styles).

      For example:

      STYLESHEET A

      #whatever, #somethingelse { border:1px solid; width:35%; }

      STYLESHEET B

      #whatever { border-color:#f00;border-style:ridge; }

      #somethingelse { border-color:#0f0;border-style:outset; background-color:#fff; }

      Just link both stylesheets in your html header section. Perhaps if you read the CSS specs at the w3c you might find some pleasant surprises :)

    22. Re:CSS is annoying by Scarblac · · Score: 3, Funny

      On a similar note, a friend of mine worked at a large telco, where they were told that they had to #define all their constants (in C)... so they (others, not my friend) had code that said #define THIRTEEN 13. The number had to change later, of course...

      The more things change, the more things stay the same :-)

      --
      I believe posters are recognized by their sig. So I made one.
    23. Re:CSS is annoying by Tablizer · · Score: 1

      You're about 10 years too late for this discussion. CSS has been a part of the standards landscape for around a decade now, and it's been bog-common for at least a few years.

      Are you saying we should live with poor standards because they are already established and it is too hard to change now? I don't see why HTML counterparts cannot slowly be added to the standard without busting backward compatibility.

      But I am still curious on why they did not ask those kinds of questions back then. Does anybody have a reference?

    24. Re:CSS is annoying by mrandre · · Score: 1
      Is it so hard to say
      .blue, #back {color:blue}
      Seems pretty straightforward to me.
      --
      "I don't want to achieve immortality through my work. I want to do it by not dying." -Woody Allen
    25. Re:CSS is annoying by Anonymous Coward · · Score: 0

      No, that does not make sense at all.

      that's why it's a cascading style sheet, not a cascading color sheet.

      Which is also why when you flip the order around of what you want to do also works.

    26. Re:CSS is annoying by ciroknight · · Score: 2

      *ahem* NO.

      If you want variables, use a language designed to work with variables to dynamically generate CSS. You have plenty of choices: PHP, ASP, Perl, Parrot, etc. ad nauseum.

      CSS *should* be just a formatting language as formatting is what it does, and all of what it does. It's sad that we couldn't just have one end-all formatting language (HTML could have been better..) and that we had to extend it with other languages to make it more flexible, but now we've got something that works. Dynamic languages, on the other hand, like Javascript, can deal with variables and make pages dynamic. And the world remains happy because it's all open standards for anyone to implement.

      Summary: Let's not change CSS if we don't have to. Use a dynamic language to generate your formatting if you must.

      short aside: I agree with the original poster. It would be great if you could choose the element and have it automatically changed in all specified objects, but it'd be tricky to parse I think, and would require a syntax change. I think it's best we stick with the typical "objectList.part { color: bleh; }".

      --
      "Victory means exit strategy, and it's important for the President to explain to us what the exit strategy is." G.W.Bush
    27. Re:CSS is annoying by imputor · · Score: 1
      What CSS *really* needs is variables

      You can put PHP into your CSS and have Apache send all CSS files through the PHP parser. Put this in an .htaccess file:

      <files somefile.css>
      AddType application/x-httpd-php .css
      </files>

      And your CSS like this:

      <? $border_color = #ccc; ?>
      div.foo { border: 1px solid <?= $border_color ?>; }
      div.bar { border: 2px solid <?= $border_color ?>; }

      But then it ends up not really being CSS then, dunnit?

    28. Re:CSS is annoying by migurski · · Score: 1

      Read up on selectors (short guide, quick read). What you're doing could be rewritten as "a.blue, span.blue, div#back { color: blue; }" as one commenter said, but more importantly, you should be naming things semantically, as another commenter hinted at. Which is to say, "blue" is a terrible class name, while "important" or "author" or "definition" or whatever are good ones, because they mean something. Your stylesheets will be a lot easier to understand if they are filled with gems like ".definition { color: blue; }".

    29. Re:CSS is annoying by Anonymous Coward · · Score: 0
      (Smart) People with repeating parts of HTML abstract them to templates. I think you probably need to do the same with your CSS -- dynamically generate it (either through a build process or at runtime). HTML could have all kinds of syntax changes but they've kept it simple so that lots of languages can generate it -- the same is happening with CSS.

      (I use browser detection and serve up different CSS files, too)

    30. Re:CSS is annoying by Anonymous Coward · · Score: 0

      IDs are unique, you don't need div#id, you can just use #id.

    31. Re:CSS is annoying by Bitsy+Boffin · · Score: 2, Insightful
      If you want variables, use a language designed to work with variables to dynamically generate CSS. You have plenty of choices: PHP, ASP, Perl, Parrot, etc. ad nauseum.

      Why introduce a whole new language into the mix if all you want to do is set some constants that can be used in your CSS.

      Things like
      darkcolor = black;
      lightcolor = green;
      so you can do
      .message { background-color: darkcolor; }
      .text { color: lightcolor; }
      obviously that is trivial, but there are a number of occasions I have come across where it would be useful, mainly with colors which you wish to remain consistent but use in different areas (you might want to use it as a background somewhere, and a border somewhere else, currently the only way to do that with plain-old-css is to hard code the color information in several different rules).

      It almost sounds like you actually LIKED <FONT> etc.
      --
      NZ Electronics Enthusiasts: Check out my Trade Me Listings
    32. Re:CSS is annoying by Anonymous Coward · · Score: 0

      Maybe he wants:

      DEFINE COLOR myownspecialblue #2040f0;

      h1,h2,h3,h4,h5,h6,h7,p,ul,li { color: myownspecialblue; }

    33. Re:CSS is annoying by Anonymous Coward · · Score: 0

      The original intention of HTML, in 1994, was to present structured content. It was never designed to make it determine how a page looks. However, as the dot-com madness came in to being, end-users could never get the concept of structured content, and Netscape shoehorned a bunch of tags in which allowed HTML to determine the presentation (look) of a web page.

      This went against the original HTML spirit.

      CSS was created so HTML could go back to its original purpose (becoming simpler in the process), and so people who wanted to change the presentation could have it be separate from the content.

    34. Re:CSS is annoying by Tablizer · · Score: 1

      CSS was created so HTML could go back to its original purpose (becoming simpler in the process), and so people who wanted to change the presentation could have it be separate from the content.

      Okay, but do we have to use an entirely different syntax to acheive that? For example, create something called Style Markup Language using XML. I am not necessarily challenging the integration level here, but the syntax choice. We can separate the concepts without adding Yet Another Web Language syntax to the already crowded syntax mix (HTML, JavaScript, app language, etc.)

    35. Re:CSS is annoying by Tablizer · · Score: 1

      I think the whole point of CSS is to separate content from presentation.

      I argued in a sister thread that seperating the concepts is an orthogonal issue to using different syntaxes for a language.

    36. Re:CSS is annoying by Qzukk · · Score: 1
      I use
      .red {
      color: red;
      }
      Then, I can define my other classes, and when it comes to the markup
      <span class="otherclass otherclass red">blahblah</span>
      works just fine
      --
      If I have been able to see further than others, it is because I bought a pair of binoculars.
    37. Re:CSS is annoying by Anonymous Coward · · Score: 1, Interesting

      I disagree.

      What we REALLY need are Cascading Javascript Sheets

    38. Re:CSS is annoying by Tablizer · · Score: 1

      That is kind of what I had in mind. However, perhaps allow shortcuts such as:

      <class border="1px solid blue" font="12pt arial" ...

    39. Re:CSS is annoying by HermanAB · · Score: 1

      Yeah, but #define TRUE 0; #define FALSE 1; makes C far more readable when you have that awkward situation.

      --
      Oh well, what the hell...
    40. Re:CSS is annoying by Anonymous Coward · · Score: 0

      Actually in this case why not use a dynamically generated Style sheet? To say, use PHP (or whatever) to generate the style sheets? That way if you have a very complex system or site you could technically Database enable the whole thing.

      I've worked in situations where that works very much in that fashion (using ASP)... and it allows you a simple way to do things with out having to define new style sheets. You just have one MASTER sheet that gets its information based on a set of section dependant variables.

    41. Re:CSS is annoying by ciroknight · · Score: 1

      I DID like FONT. In fact, to this day, most pages I code are 100% HTML4 with CSS positioning because I like FONT so much. What I really hated was TABLE and how you couldn't just specify where you wanted the cells, you'd have to nest them to get complex borders, and all of the above costed valuable bandwidth. CSS got rid of that problem.

      I, as a former web designer, believe that abstraction is a good policy, but only where it needs to be a policy. If I know I have a page that I want the colors to change a lot in, I code it with enough flexibility to easily plug in a sprig of PHP/ASP to change the colors. Both languages are quite capable of inserting the colors at my will, and get the job done if I *WANT* to be that lazy. Otherwise, I just use my editor to find all of a certain color, and replace it with the other. Neither of these options are inconvienent in the least to me. Besides, using ASP- and PHP-driven CSS gives you TONS of flexibility when it comes to layout. Imagine dynamic stylesheets without having to touch a single line of code, or without renaming any files. There are a million scripts on the internet these days to facilitate this, and it's simple enough that you can write it yourself in just a few hours without any problem.

      --
      "Victory means exit strategy, and it's important for the President to explain to us what the exit strategy is." G.W.Bush
    42. Re:CSS is annoying by arethuza · · Score: 1
      How about this that I found recently (in Java):
      public final static String COLON = ":";
      I don't know about you, but I don't change colons very often.
    43. Re:CSS is annoying by johannesg · · Score: 1
      #define TRUE 0; #define FALSE 1;

      You do realize that the punishment for inverting the truth values is dismemberment, right? Check out the following fragment:

      if (TRUE) {
      /* This happens! */
      /* uhh, except for broken values of TRUE */
      } else {
      /* This does not happen! */
      /* ...see caveat above */
      }
      Inverting those values instantly puts most C programmers on the wrong foot and makes your code fundamentally incompatible with any other code out there. Especially when that other code has the good sense of defining TRUE and FALSE correctly...

    44. Re:CSS is annoying by Unknown+Lamer · · Score: 1

      CSS predates XML (IIRC).

      Why break backwards compatibility? And there is XSL if you need XML. I suppose one day it will replace CSS but things move slowly in the name of backwards compatibility).

      We need to go back to S-Exps ;)

      --

      HAL 7000, fewer features than the HAL 9000, but just as homicidal!
    45. Re:CSS is annoying by Photon+Ghoul · · Score: 1

      I think that either you don't understand what CSS is about and how it works or maybe you are just making it harder than it is by thinking of things in a programming mindset. You're essentially asking for constants in a CSS file, am I right? Where you are trying to set the color to red in your hypothetical #define statement... you simply do that at the color: statement (well, technically it would be background:).

      The intention of CSS is to seperate document presentation from document structure. While doing this, it also attempts to give a high degree of control to the person creating the style definitions. At the same time, there are no variables and constants within the CSS 'language'. I think you're trying to fit a rectangle into a circle.

    46. Re:CSS is annoying by Anonymous Coward · · Score: 0

      Just wait until stem cell research takes off...

    47. Re:CSS is annoying by MrDomino · · Score: 1

      I've spent the weekend writing up some CSS layouts, and I'd previously come upon the same thought as you have--CSS would be a lot better off with definable constants. It wouldn't take an unreasonable expansion to the language, either; heck, there's already a similar (albeit not very well-supported) functionality built in for other purposes, in the form of the @font-face rule. Extending that a bit, as I see it, it would be almost trivial to standardize something like @constant { name: "light-text"; value: "#3fc" }. That would definitely make stylesheets more maintainable and expandable--I could produce entirely new color schemes in a static CSS file just by editing some values at the beginning. A variable system like that seems much more in line with the overall spirit of CSS than the current method of repeatedly referencing the exact color or relying on other means to work out the layout.

  7. CSS? by had3l · · Score: 3, Funny

    Since when you need a book to play Counter Strike: Source?

    1. Re:CSS? by Weirdofreak · · Score: 1

      If you're like me, you need the manual. Without it, I'm always afraid I'll screw everything up.

    2. Re:CSS? by had3l · · Score: 2, Funny

      Manual? You take me for some kind of fool?

  8. CSS W3C Standard by st3v · · Score: 3, Informative

    Actually for the experienced person I would recommend learning from the actual "Standard" of CSS at W3C.

    CSS 2.1 Specification

    If you want to see the upcoming CSS 3 standard, or learn more about CSS, you can go here:

    http://www.w3.org/Style/CSS/

    1. Re:CSS W3C Standard by ravenspear · · Score: 1

      If you want to see the upcoming CSS 3 standard

      No need to bother yourself with that, as it won't become viable until Longhorn 2.0 ships in 2013.

  9. CSS virgin by Anonymous Coward · · Score: 5, Funny

    CSS virgin

    Would that be someone who:

    1. doesn't understand CSS at all?
    2. reads/understands CSS, but can't write it?
    3. is proficient in reading and writing CSS, but is a virgin (i.e. 70 % of Slashdotters)?
    1. Re:CSS virgin by Anonymous Coward · · Score: 0

      whatever, geeks get tail; we're 'in', man.

    2. Re:CSS virgin by aardwolf204 · · Score: 1

      so true.

      --
      Im dreaming ofa big bndwdth, That can resist the /.crowd.May ur days b merry & bright & may al
    3. Re:CSS virgin by Anonymous Coward · · Score: 0

      harsh!

  10. CSS books? by Anonymous Coward · · Score: 3, Funny

    First CSS encrypted DVDs, now CSS encrypted books? What's this world coming to? Looks like I won't be able to co^h^hread my books now. ;)

    1. Re:CSS books? by Anonymous Coward · · Score: 0

      ROTFLMAO
      This is the funniest shit I've seen on /. in a long time.

    2. Re:CSS books? by Anonymous Coward · · Score: 0

      You think that's funny, you fucking stupid asshole-licking son of a bitch. Everybody hates you and your miserable attempt at humour. Die, die,die, bitch!

  11. Almost there by MikkoApo · · Score: 1

    a.blue, span.blue, div#back {
    color: blue;
    }

  12. Free? What about the time factor? by Spy+der+Mann · · Score: 5, Insightful

    Not sure who would plonk down good money when so many thorough tutorials are online.

    When you need to get things done FAST, and learn while not in front of your computer monitor, or maybe even have a quickreference handy, you need to buy books. Hey, what if suddenly your internet connection drops?

    I'm a customer of Sitepoint (the company that published the book), and I purchased the "build your own... website using PHP and MySQL". I keep it always handy on my job desk.

    Also, having a manual handy (either printed or downloaded, such as the PHP reference) saves you lots of trouble. I've talked with many people who just use the online PHP manual, and they keep asking me stupid questions they could have answered themselves had they downloaded the reference in CHM format.

    Never forget that time is money, and learning online "for free" might cost you lots of hours that you could have well spent designing a website and getting paid.

    1. Re:Free? What about the time factor? by Anonymous Coward · · Score: 0

      Internet connection dropping? No problem, you have already downloaded a local copy of the CSS specifications so you have quick access to them on your own machine / lan.

    2. Re:Free? What about the time factor? by Anonymous Coward · · Score: 1, Informative

      Books have their uses, but some of your arguments aren't really good:

      When you need to get things done FAST, and learn while not in front of your computer monitor...

      Um, this is CSS we're talking about, there's no use for CSS when you're away from your computer. The only time a book is better is in a meeting, when someone asks if such-and-such is possible with CSS...

      Hey, what if suddenly your internet connection drops?

      As already mentioned, download useful websites to your local computer.

      Never forget that time is money, and learning online "for free" might cost you lots of hours that you could have well spent designing a website and getting paid.

      Sure, there are two problems here. (1) Most of us don't have so much work that we can't take some time learning without losing billable hours. (2) You lose billable time learning anyways, whether it's from a book or online, you're making the wrong assumption that online resources are worse than books, there is no such correlation.

      Look, for some people books are better, for others websites are better. Live with it and stop making half-assed arguments for one or the other.

    3. Re:Free? What about the time factor? by Anonymous Coward · · Score: 0

      Hey, what if suddenly your internet connection drops?

      Well, then web pages aren't very usefull without a web, now are they. If your internet connection drops, go fix it rather than trying to code CSS.

      Last I checked, there wasn't a paperback version of grep. It tends to be quite a lot faster than looking in an index and finding the referenced page only to realise that it's not the reference you wanted.

      Then there's the whole copy and paste thing... a book, scisors and scotch tape don't mesh so well with vi and Apache.

  13. yes there is a way, just backwards:CSS is annoying by Anonymous Coward · · Score: 1, Interesting

    a.blue, span.blue, div#back {color:blue;}

    you can assign a set of attributes to multiple IDs and classes.

    also remember that the "cluttered look" and extra space is not really such a bad thing. as long as the style sheet is external, "readability" and ease of use and editing is more important.

    many people can make CSS do cool stuff, but few are using it properly - too many IDs, setting IDs when a class would suffice, using inline styles repeatedly, hacks and whacks with margins and negative padding to fix display issues instead of using the proper assignments.

    I love that CSS is gaining so much popularity, but people are already starting to crap out poorly planned and non standard code that is almost as bad as tables and "shims" (spacers, transpix, whatever).

    CSS should make sitewide changes easier and quicker, read the spec! follow the spec! check the W3C! dont just follow the hacks of blogs and sites, learn to use the great tools properly, sure you can pound nails with a wrench, but when you have a pneumatic hammer - why bother! just wait for CSS 3! (and wait ^3 times longer for browsers other than Moz to comply with the standard)

    how hypocritical, i say to my self as I look at all the crappy "s" i have strewn about this post

    -nappingcracker

  14. Ooooh, that scary markup by Jesus+2.0 · · Score: 3, Funny

    It is "firmly pitched at the coder", but it has to explicitly state that it "assumes that you're not scared of mark-up"?

    If you're "scared" of mere markup, I would hate to see your actual coding.

  15. CSS is not annoying, knowledge must be acquired by fuw · · Score: 2, Informative

    As folks have pointed out, you can set a class for blue text or you can use the comma-separated list to apply the color.

    What people haven't mentioned (I didn't see anyway) is the fact that you can apply multiple classes to a single element. So you can have your "blue" class for blue colored text (although that is a very bad class name...think about if you change the color to green). So you can do... .info{
    color:blue;
    } .att{
    font-weight:bold;
    }
    a{
    text-decoration:none;
    }
    div#back{
    border:1px solid red;
    }

    Then in your HTML...

    <div id="back" class="info">
    <p>this is some text</p>
    </div>
    <p class="info att">This desrves special attention, it should be bold and blue.</p>

    The ability to add multiple classes to a single element is awesome!

  16. im not easy by Anonymous Coward · · Score: 0

    I don't want to lose my CSS virginity.

    im saving myself for marriage

  17. Comment removed by account_deleted · · Score: 1

    Comment removed based on user account deletion

  18. Comment removed by account_deleted · · Score: 1

    Comment removed based on user account deletion

  19. takes you from CSS virgin to... by Anonymous Coward · · Score: 0

    CSS fucked up beyond all recognition

  20. Comment removed by account_deleted · · Score: 1

    Comment removed based on user account deletion

  21. Comment removed by account_deleted · · Score: 1

    Comment removed based on user account deletion

  22. Why I hate CSS by david.given · · Score: 2, Interesting
    Basically, I find that the biggest problem with CSS is that it's like most of the other of the W3Cs standards: a really good idea implemented in a really half-assed way. (XML --- plus: namespaces, ASCII, structured data, extensibility. Minus: repetitive, bloaty, unseekable, attributes vs real nodes. XSLT --- plus: general purpose XML transformation language. Minus: it's written in XML; it's not a real programming language; it's stupidly limited in a lot of ways (variables that won't vary?). XPATH --- don't get me started. etc.)

    I'll leave aside whether it's a good idea to have a dynamic web page made up of three *different* scripting systems in one document, and just go on to mention two of the things that bug me most:

    Firstly, it does not seem to be possible (unless I just haven't found it yet, please feel free to correct me) to say that I want style FOO to be the same as style BAR except with these changes. i.e., true hierarchical styles. Any word processor worthy of the name supports this. It allows you to make sure that each important style property is defined in exactly one, central place.

    Secondly, CSS' styling system is very, very limited. How do you say, I want this container to be big enough to fit this string into? You can't. This means that any kind of layout where you have sized objects with text in them --- such as columns, or a header --- has to be specified in fixed values. You can't say, I want a graphic followed by a line of text followed by something that fills all the rest of the space. (You've got ems and ens and points but frankly, they're not useful.)

    I do think that CSS is currently the best thing around for formatting HTML; I've also used it with moderate success for formatting raw XML. It just makes me cringe when I think how good it could be, and how lousy it actually is... I keep having this urge to write my own formatting engine in Javascript, and that's never good.

    1. Re:Why I hate CSS by Anonymous Coward · · Score: 0

      #1
      .bar,.foo { common style attributes }
      .foo { override whatever you want }

      #2 - look into something like this
      width:100%;
      white-space:nowrap;

      which will prevent line breaks and fill the full width of the parent container (body, div, whatever).

    2. Re:Why I hate CSS by Anonymous Coward · · Score: 0

      Firstly, it does not seem to be possible (unless I just haven't found it yet, please feel free to correct me) to say that I want style FOO to be the same as style BAR except with these changes. i.e., true hierarchical styles. Any word processor worthy of the name supports this. It allows you to make sure that each important style property is defined in exactly one, central place.

      Yes you can. Just define FOO as a DIV and BAR-DELTA as another DIV, where BAR-DELTA specifies the differences between FOO and BAR. Then nest BAR-DELTA within FOO. Done.

      This means that any kind of layout where you have sized objects with text in them --- such as columns, or a header --- has to be specified in fixed values.

      Hmm... that's exactly the sort of layout mental rut you are supposed to get away from. You should not have perfectly sized objects and layouts because you have no control over what sort of output device a viewer is going to use. What if he's blind and uses a speaking program to render the website?

    3. Re:Why I hate CSS by Archon-X · · Score: 1

      IIRC, you can also go to apply both styles.

      I am by no means a CSS whiz, but re: "it does not seem to be possible (unless I just haven't found it yet, please feel free to correct me) to say that I want style FOO to be the same as style BAR except with these changes. i.e., true hierarchical styles. "

      I'm quite sure that it is possible

    4. Re:Why I hate CSS by Anonymous Coward · · Score: 0

      You can't say, I want a graphic followed by a line of text followed by something that fills all the rest of the space. (You've got ems and ens and points but frankly, they're not useful.)

      Actually it's always advised you avoid setting absolute height values to any container. If you do not set a height value, the container stretches automatically to fit the content. Also, if your graphic is a part of your layout (meaning, it will always be there on every page because it's part of the design) you should set it as a background image for the container. You can either put the image in its own container above the text content (the proper way) or set it to be the background image of the content's container and set it to no-repeat. Then you could set the container's top padding to the height of the graphic or set the content inside of the container to start **px from the top (relative positioning). If you want the container to be a minimum height, there is a minimum height value (unsupported properly by IE and older browsers) or you could use the faux collumn method (if you're referring to a collumn matching the height of another collumn when each has a different amount of content in them. I won't go into detail in that, but it's easy.

      If you can't tell, I do this for a living. Either I'm misinterpreting your claims of limitations or you don't know enough of what you're talking about.

    5. Re:Why I hate CSS by foniksonik · · Score: 1

      I'll second the other responder.... CSS has plenty of control... in fact I wish that Quark and InDesign would support CSS for object positioning... then I could define placement as well as typestyle...

      Most of the problems probably come from rendering issues not spec issues....

      Try working with SVG for a while and be happy for basic CSS+HTML

      --
      A fool throws a stone into a well and a thousand sages can not remove it.
  23. Comment removed by account_deleted · · Score: 1

    Comment removed based on user account deletion

  24. CSS in IE by Bloater · · Score: 1

    There's a little script I found that I use on my web page, though I know it doesn't all quite work, but then Windows users can all go install Firefox.

    1. Re:CSS in IE by pyrotic · · Score: 0

      This is a real sign of progress. In the late 90s we hacked websites with javascript so they'd work with Netscape 4. Now, 6 years later, there's a great new browser independent markup language that makes browser-specific hacks a thing of the past. Oh, hang on. We're still writing javascript hacks to make sites work with the latest and greatest browsers.

      Separation of layout and content is a fine idea. But does it have to be done on the client-side? What makes XML more suited to this than perl or PHP or python? Is this heresy?

      Ah yes, I forgot. The mobile revolution. This is why we recoded all our apps for WAP. Remember WAP? Excuse me for being underwhelmed by the number of Nokia/Ericson users visiting our sites.

      Those of you who are true belivers in new technology, please don't be surprised if not everyone has recoded their sites to the latest and greatest XMLized standard. The development tools suck, and browser support is patchy. You'd think someone would have come up with a working solution by now. Oh well, there's always CSS3 to look forward to. I can hardly wait.

  25. CSS Reference Poster.... by Anonymous Coward · · Score: 0

    I noticed that the publisher (sitepoint) is giving away a CSS reference poster through their Website as a free bonus with this book. Anyone seen seen the poster? Is it any good?

    I'd get the book just for the free reference poster if I knew it was thorough and most importantly, accurate.

  26. Here's a handful of good CSS resources by mmmuttly · · Score: 5, Informative
    I spent about 30 hrs this week working the CSS. Here are some of the couple dozen sites I visit regularly. They're not all tutorials, but all are useful. There are a lot of place where standards and the real world usage clash. A couple of tips from me - Build and test your pages in Mozilla first. Even though MSIE still has a huge lead in mkt share, Slashdotters will be surprised to find out that Explorer is a stagnant sun dried dog turd, full of buggy, half-assed standards implementation. It's much easier to do it right first, then insert workarounds so the CSS displays correctly in Explorer. It's easier to achieve the results you want if you start at zero. Null the defaults so that all the implicit layout collapses. * { margin: 0; padding: 0; borders: 0; } If you find these links useful, please pay me back by checking your work on a Mac too. As a website user, I get really sick of seeing display wackiness - especially lines of type with squashed leading or running beyond the container div because nobody bothered to test in a Mac environment too.
    1. Re:Here's a handful of good CSS resources by Ryosen · · Score: 1

      You wouldn't happen to know of a decent Mac-browser emulator would you?

      One project that I worked on had us testing against WebTV, for which this tool came in handy.

      --

      Ryosen
      One man's "Troll, +1" is another man's "Insightful, +1".
    2. Re:Here's a handful of good CSS resources by Unknown+Lamer · · Score: 2, Informative

      You wouldn't happen to know of a decent Mac-browser emulator would you?

      Konqueror

      If it works in Konqueror it should be fine in Safari. OmniWeb uses Safari renderer now and I don't think that anyone really uses IE for Mac anymore since it sucks hard (when I was still in High School the school got a brand new 766Mhz top of the line G4 and installed OS X Beta on it and I used that through X.2 on a daily basis before I graduated...oh how I shall miss thee, backroom OS X box that no one else got to use).

      Mozilla on the Mac is the same as Mozilla everywhere so that covers Firefox, Mozilla, and Camino. I dunno about iCab, I haven't used that since I have 7100/66 back in 98 (running good old OS 8 with 24M of RAM and it was usable dammit).

      --

      HAL 7000, fewer features than the HAL 9000, but just as homicidal!
    3. Re:Here's a handful of good CSS resources by yzka · · Score: 2, Informative

      I use http://browsercam.com/ for testing different CSS-layouts. It's not perfect, but trial version is free for 24 hours... ;)

  27. How is your non-sequiter insightful? by Ars-Fartsica · · Score: 1
    How do you make the inference that all online learning materials are "lame" or "time wasting"???

    How do you make the inference that books are faster? Can you search a book with Ctrl+F? Care to take a bet that my Ctrl+F is faster than your index?

  28. Maybe you should read a book / the spec by brunes69 · · Score: 3, Informative

    Firstly, it does not seem to be possible (unless I just haven't found it yet, please feel free to correct me) to say that I want style FOO to be the same as style BAR except with these changes.

    What?? It is called Cascading Style Sheets for exactly that reason, it cascades!

    .foo{ background-color: red; color:green; }
    .bar{ color:blue; }

    <div class="foo bar">This has red bg color with blue fg color.</div>

    Secondly, CSS' styling system is very, very limited. How do you say, I want this container to be big enough to fit this string into? You can't.

    Big enough to fit what string? A container can fit any string with a proper overflow property.

    This means that any kind of layout where you have sized objects with text in them --- such as columns, or a header --- has to be specified in fixed values.

    This is simply not true. It is fairly simple to generate tabular layouts using pure CSS (that is what display:table-row and whatnot are for!)

    You can't say, I want a graphic followed by a line of text followed by something that fills all the rest of the space.

    Try this:

    <div style="display:table-row;">
    <div style="display:table-cell"><img src="http://images.slashdot.org/title.gif"/></div>
    <div style="display:table-cell;">Line of text</div>
    <div style="width:100%;display:table-cell;background-co lor:blue;">Fill line</div>
    </div>

    Seriously man.. CSS has lots of limitations (some of which will be addressed in V3, some of which aren't), but nothing like what you are spewing. I really suggest you read up some on the spec before you start bashing it so hashly.

    1. Re:Maybe you should read a book / the spec by glwtta · · Score: 1
      What?? It is called Cascading Style Sheets for exactly that reason, it cascades!
      .foo{ background-color: red; color:green; }
      .bar{ color:blue; }
      <div class="foo bar">This has red bg color with blue fg color.</div>

      You sir, are my favourite person right now - I've been looking for this for years (even remember trying 'class="foo,bar" at some point; so close)! Now can someone tell me why not a single CSS tutorial/reference out there mentions this?

      I'd still like to be able to do this in the style definition itself (.bar [foo] { color:blue; }, or somesuch), but I guess that'd be polluting their "designer" ideology with my "coder" mindset, or something.

      --
      sic transit gloria mundi
    2. Re:Maybe you should read a book / the spec by pjt33 · · Score: 1

      Can you explain why I should use CSS table syntax rather than HTML tables? I'm trying to move over to using CSS for my layout, but finding that sometimes tables seem to be the only way to get the layout I want.

    3. Re:Maybe you should read a book / the spec by david.given · · Score: 2, Insightful
      <div class="foo bar">

      I didn't know about that; useful, although not quite what I'm looking for. Ta.

      (The thing I object to here is that it requires the HTML content to have detailed knowledge of the mechanism of the markup, which is evil --- there's no need for the content to have to state that that particular div is a foo and a bar. It should just be able to state that it's a bar. The relationship to foo should be in the style sheet.)

      Big enough to fit what string? A container can fit any string with a proper overflow property.

      Big enough to fit a string without overflowing, of course.

      Take that hoary old example, the columned layout. On my website I have a columned layout made up of tables. I want the left-hand column to be as small as possible without wrapping the 'cowlark.com' logo in the top-left corner, and the right-hand column to occupy everything else.

      I cannot find a way of doing this with CVS. The problem is working out how wide to make the left-hand column. With tables, the logo does not contain any spaces, and so the table layout algorithm will try quite hard not to wrap it; try resizing the font and you see it all still works (pretty much). With CSS, I have to hard-code the logo's width, and I can't tell what that is, because it depends on the fonts being used.

      I have only recently discovered display:table-row and friends, and I could probably use those instead, but it's still basically tables. There should be a better way.

      CSS has lots of limitations (some of which will be addressed in V3, some of which aren't)

      <plaintively> Can we have decent support for CSS2, please? Leaving aside the aberration that is IE's attempt at CSS implementation, Gecko doesn't even do counters yet...

    4. Re:Maybe you should read a book / the spec by Arkaein · · Score: 1

      The best reason is if you ever want to change the layout of your site in the future.

      If done correctly and with foresight you can design complete a CSS layout which can be completely modified at a later date without a single change to your (X)HTML code. This isn't trivial, as it is hard to know for certain what changes you may want in the future.

      The typicaly scheme which I use on my rather simply laid out website (monsterden.net) is basically to divide the code up into chunks using divs, and assign IDs or classes to divs based on content type. Doing this you will generally only run into problems if you decide at a later time that you want to rearrange blocks with finer granularity than you initially planned.

      Another reason which does not apply in all cases is readability. If you look a the code on my site you'll see that it is extremely readable. This is important to me because I code my site completely by hand. CSS removes a lot of table clutter and makes nesting of code blocks less of an issue.

      Finally you can do some rather nifty tricks with CSS that would otherwise require Javascript. On my background images pages I use a few of these to create some nice artistic effects, including the changing of the cneter image when a link is hovered over (NOTE: I'm not sure if the CSS on this particular part of my site works in MSIE, as I went for coolness over full compatability here. The rest of my site is fully compatible with all modern browsers AKAIK).

    5. Re:Maybe you should read a book / the spec by irc.goatse.cx+troll · · Score: 1

      "With CSS, I have to hard-code the logo's width, and I can't tell what that is, because it depends on the fonts being used."

      Your logo is "cowlark.com" in text. Thats 11 elements(characters). You can just set the size as 11em, and the browser figured out how much 1em is based on the size of the font.

      --
      Pain lasts, kid. Its how you know you're alive. Sometimes I think this growing up thing is just pain management-TheMaxx
    6. Re:Maybe you should read a book / the spec by brunes69 · · Score: 1

      For HTML? No, I can't give a good reason really (other than that it is "more compliant", sort of.

      For XML? Well, Table tags don't work there, do they? :P

      That's the point, and half the power of CSS.. you can write a simple style sheet, and apply it to an XML DOC that you got from Excel or OpenOffice or whatever, and have it appear pretty.

    7. Re:Maybe you should read a book / the spec by david.given · · Score: 1
      Your logo is "cowlark.com" in text. Thats 11 elements(characters). You can just set the size as 11em, and the browser figured out how much 1em is based on the size of the font.

      Actually, an em is the height of the font, from the lowest descender to the highest ascender. (It used to be the width of the letter 'M' in that font, hence the name --- you'll never guess what an en is.)

      This means that 11em is going to be roughly the width of:

      MMMMMMMMMMM

      Which is much longer than my logo, in a proportional font:

      cowlark.com

      So, it still doesn't help, I'm afraid.

    8. Re:Maybe you should read a book / the spec by Excelsior · · Score: 1

      Can we have decent support for CSS2, please? Leaving aside the aberration that is IE's attempt at CSS implementation, Gecko doesn't even do counters yet...

      Back up the truck. Your original contention is:
      Basically, I find that the biggest problem with CSS is that it's like most of the other of the W3Cs standards: a really good idea implemented in a really half-assed way.

      You can't rip the W3C's standards, and then back up your contention by complaining that vendors haven't implemented the standard. It's not the W3C's fault that IE's or Mozilla's implementation or their standard sucks.

  29. Some useful information on a slashdot thread? by Anonymous Coward · · Score: 0

    Thanks for the pointer to whateve:hover.

    Every nifty CSS techniques require work around for one browser or another.

    Every browser got flaws, but IE breaks on purpose. Bill Gates should be prosecuted and order to pay restitution...

  30. Sometimes, sometimes not by Loundry · · Score: 1

    Name them for what they are, not what they look like.

    This is good advice sometimes, but not all the time. I've designed lots of tables where the creative department says, "Use the gray box there," or "Use the red table there." Since I was writing a lot of reports, was I less wise to choose to name the class, "grayBox" and have all the reports use it rather than name each one of 14 reports by its proper name? As it turned out, no, it wasn't.

    So I think the answer here is to use your best judgement. Sometimes it's wise to name elements/classes based on what they look like, and sometimes it's not.

    --
    I don't make the rules. I just make fun of them.
  31. Markup, my eye! by Loundry · · Score: 1

    If you're "scared" of mere markup, I would hate to see your actual coding.

    Calling CSS "markup" is disingenuous at best. I think the reason why said "markup" is frightening to programmers is because it is necessarily replete with obscure logic and pretends as hard as it fucking can that it doesn't have any logic within it and there is NO CLEAN WAY TO DEBUG IT.

    CSS is as friendly to programmers as a circular saw is to a man's penis.

    --
    I don't make the rules. I just make fun of them.
  32. terrible names? by Loundry · · Score: 1

    Which is to say, "blue" is a terrible class name, while "important" or "author" or "definition" or whatever are good ones,

    I don't buy it. In my last job, I heard a lot of, "Use the gray box there" (as opposed to the red, green, or gold boxes which were used elsewhere). The box that surrounded the area was never indicatedt o be "important," or regarding an "author" or "defintion." They wanted it to be gray.

    So what's wrong with in this case? I caught a lot of the, "Always use semantic class names or the Angel of Death will certainly kill you and all your children, you dumbass ingrate," and I'm not so impressed by the threats any more.

    --
    I don't make the rules. I just make fun of them.
    1. Re:terrible names? by zdislaw · · Score: 1

      What's wrong with that is that the guy who said "use the gray box there" will change his mind and want the box to be blue next week. Then your HTML that says will be used to display a blue table. It's not a threat, it's a reality that design changes and it's a shame if you have to change your HTML every time it does. Might as well be using font tags and bgcolors in tds again. That the angel of death will kill you and your children is also not so much a threat, as a promise. That your boss is never going to change her mind about colors is as likiely as you and your children living forever. It may not happen tomorrow, but you cannot argue that death will not eventually happen.

      --
      bad sig...no donut.
    2. Re:terrible names? by migurski · · Score: 1
      I don't buy it. In my last job, I heard a lot of, "Use the gray box there" (as opposed to the red, green, or gold boxes which were used elsewhere). The box that surrounded the area was never indicatedt o be "important," or regarding an "author" or "defintion." They wanted it to be gray.

      It helps if the semantic approach is used from the beginning. If you're in a maintenance position where site components are already defined by their color rather than their meaning, then there's not much you can do about it. The point is that these things should be considered before the production process starts, when designers are coming up with a visual language for the project. At that point, the question isn't about CSS selectors or style sheet names, it's about what those styles mean: is gold new stuff? Does red indicate breaking news? Should headlines be in sans-serif bold? etc.

      When redesign-time comes, you get to reap the benefits of changing just the stylesheets instead of grepping through the whole site looking for "blue". Check out this awesome writeup from Dunstan Orchard, who had to redesign the entire Mozilla Europe site without touching most of the HTML.

  33. An Oxford dictionary? by addaon · · Score: 1

    A dictionary for the slashdot team

    (Yes, it's a referral link. Any proceeds go towards actually buying the book for them. Shipping, if any, and the second half of the cost is out of my pocket.)

    --

    I've had this sig for three days.
  34. I tried by Ohreally_factor · · Score: 1

    I tried telling Taco about CSS and his reply?

    "Phht. The Lion, The Witch, and The Wardrobe sucked.

    --
    It's not offtopic, dumbass. It's orthogonal.
  35. I believe he was requesting by warrax_666 · · Score: 2, Insightful

    something along the lines of

    .foo { background-color: red; color: green; }
    .bar { inherits: .foo; color: blue}

    and that applying <div class="bar"> would then set the bgcolor to red and the fgcolor to blue. In your example you still have to remember that .bar is based on .foo in every single place you use it. Much less useful.

    --
    HAND.
    1. Re:I believe he was requesting by hammy · · Score: 1

      What about: .foo, .bar { background-color: red; color: green; } .bar { color: blue}

      Doesn't this do exactly what you want?

  36. Re: slashdot book reviews by Anonymous Coward · · Score: 0

    " has anyone seen a review of a book that doesn't get an 8, 9, or 10?

    also, does anyone review books that aren't pussy books on perl, php, css, etc.?"

    Very well said. I was thinking the same. There is an ugly truth probably though: Books on almost any aspect of computing tend to be aimed at consumer dweebs.

    There is so much free tutorial and info on CSS I can't understand some gullible fool bothering to buy a book and read about it

    I mean really, who on Earth needs a book to teach themselves CSS as if it were C++ or something.

  37. Re:new browser war by Anonymous Coward · · Score: 0

    Konqueror, opera, and the Big 3.

  38. oops...trying again by zdislaw · · Score: 1

    Man I'm rusty. Haven't posted to slashdot in a long time. Let's see if this message works better using extrans...

    What's wrong with that is that the guy who said "use the gray box there" will change his mind and want the box to be blue next week. Then your HTML that says <div id=grey"> will be used to display a blue table. It's not a threat, it's a reality that design changes and it's a shame if you have to change your HTML every time it does. Might as well be using font tags and bgcolors in tds again.

    That the angel of death will kill you and your children is also not so much a threat, as a promise. That your boss is never going to change her mind about colors is as likely as you and your children living forever. It may not happen tomorrow, but you cannot argue that death will not eventually happen.

    --
    bad sig...no donut.
  39. The Mystics of Graphical Design by UnConeD · · Score: 1

    "I wanted to scream as people dickered over whether 0xCCFFEB was better than 0xCCFF8B for a background color, ... just pick one of them, dammit!"

    And of course, you've /never/ /ever/ heard coders bicker about which storage structure to use, or which object organisation is best.

    In my opinion, the reason most geeks suck at design is because they think they're special somehow. Graphical design skills, just like coding skills, are cultivated. That kid in primary school that always wowed everyone with nifty drawings of superheroes? He became that good because he spent tons of time practising. Sure, he probably had a little helping in the fine motor skills department, but that's not what made him good. And digital tools mean you can try and change and practice without having to take a new piece of paper every time.

    Most of the people here will have been programming way before ever having any computing class in school. And they'll be lightyears ahead in terms of coding skill than the average CS graduate who knows all the "best practices" by heart. Knowing how to code does not make you good, doing it does. You cultivate your sense of good and bad code over the years, just like graphical designers cultivate their sense of proportions, curvature, light/shading/shadows and spacing.

    If you're a geek, take the geeky approach: look at shapes in terms of curvature and torsion (calculus!). Making nice flowing shapes is nothing but making sure the derivatives are continuous. Lighting and shadows? Vector math and phong/radiosity/gi. And most 2D pixel operations are nothing but signal processing.

    Every person has a sense of aesthetics, all you need to is turn it from a feeling into a practical guide. You need to learn that when your brain tells you "something does not look right", whether it is due to lack of contrast, too little/too much spacing, lack of depth, etc.

    So, fire up The Gimp, Photoshop, Paint Shop Pro, or whatever you're comfortable with, and start making mockups (don't try to design directly with XHTML/CSS, it's inpractical). Try out tons of variations. Feel free to imitate the CSS Zen Garden (without copy/pasting) as this is a good excersise in discovering the many almost invisible details that turn them from good design into great design.

    It does take time and practice, but then, there's no such thing as a free lunch.

  40. are you sitting comfortable? by Nazeryth · · Score: 1

    i was currious, where did you hear 'are you sitting comfortable? then ill begin.' (one of your headers in the review) it is almost certainly my own ignorance. but the only connection i make(and it has personal significance) is to a record 'the voyage of happiness stan' by the small faces- the second half of the record(with the happiness stan story) begins 'are you all sitty comfortable 2 square on your body? then ill begin.' im looking at the anthology now, thanks for the tip. and if you have no idea what im talking about- please disregard.

    1. Re:are you sitting comfortable? by Anonymous Coward · · Score: 0

      'Are you sitting comfortably?' comes from the early days of children's radio on BBC radio. The program 'Listen with Mother' would always preface their story with the phrase 'Are you sitting comfortably, then I'll begin.' The same phrase was carried over in to the early days of televison with the program 'Watch with Mother'.
      The phrase is well known in the UK and so appeared on the Small Faces album.

  41. I think you're arguing for me, not against me by Loundry · · Score: 1

    It helps if the semantic approach is used from the beginning.

    Exactly my point. I think that the decision to use the semantic approach from the beginning is a *religious* decision, not a *technical* decision.

    is gold new stuff? Does red indicate breaking news?

    Those types of questions didn't apply in this case. In some cases, the red looked better than the gold. It's just the color of the box and doesn't necessarily have to imply anything else than what just happens to look good with the other colors on the page.

    --
    I don't make the rules. I just make fun of them.
    1. Re:I think you're arguing for me, not against me by migurski · · Score: 1
      I think that the decision to use the semantic approach from the beginning is a *religious* decision, not a *technical* decision.

      Perhaps ... but I've been in the position of having to re-approach old markup numerous times, and it's pretty much always been a lifesaver to have consistent, meaningful style rules. Actually, one of the best bits of advice I've yet seen on CSS is to take it one step further, and have separate stylesheets that control font, color, and layout. I've found this to be significantly more sanity-preserving.

      Those types of questions didn't apply in this case. ... It's just the color of the box and doesn't necessarily have to imply anything else than what just happens to look good with the other colors on the page.

      Okay, but what about the rest? Font, line spacing, border style, margins, padding? Surely these weren't also decided on an ad-hoc basis? If they were, I don't envy you the maintenance of this site in the future.

    2. Re:I think you're arguing for me, not against me by Loundry · · Score: 1

      Okay, but what about the rest? Font, line spacing, border style, margins, padding? Surely these weren't also decided on an ad-hoc basis? If they were, I don't envy you the maintenance of this site in the future.

      I think you're taking it far too seriously. It seems that those who advocate the religion of not naming anything according to how it looks take on faith that every bit of every class will change nine million times every single week, so everything must be named abstractly to the 9 millionth degree. In reality, it's not quite so important. Sometimes doing it "your way" makes for more work, not less.

      --
      I don't make the rules. I just make fun of them.
  42. No problem by Loundry · · Score: 1
    What's wrong with that is that the guy who said "use the gray box there" will change his mind and want the box to be blue next week.

    In which case I would have changed
    <div class="grayBox">
    into
    <div class="blueBox">
    I know this happens to violate the "don't name classes in the Evil Way" rule, but seeing as how millions of babies and kittens would NOT die from this decision, I don't feel so worried.

    Then your HTML that says div id=grey" will be used to display a blue table. It's not a threat, it's a reality that design changes and it's a shame if you have to change your HTML every time it does.

    This sounds like scare-mongering for the purose of protecting the strong desire to be "right" and "correct." In the real reality, it was more likely that the entire site would be redesigned than the grayBox may change into a blueBox. Granted it was not a large site, but there are many such "not large sites" which hire programmers like me, and the "Never name classes according to how they look" is *not* a valid universal rule.

    Might as well be using font tags and bgcolors in tds again.

    No, classes are still better than font tags and bgcolors. Even when I do it the Heathen(TM) way.

    That the angel of death will kill you and your children is also not so much a threat, as a promise.

    A promise of the "unfulfilled" variety.

    That your boss is never going to change her mind about colors is as likely as you and your children living forever. It may not happen tomorrow, but you cannot argue that death will not eventually happen.

    And yet changing "grayBox" to "blueBox" (which never had to happen, which was exactly according to my predictions) would have solved that world-peace destroying problem quite nicely. It seems like the only rule I'm violating is a religious one.
    --
    I don't make the rules. I just make fun of them.
    1. Re:No problem by Anonymous Coward · · Score: 0
      That the angel of death will kill you and your children is also not so much a threat, as a promise.

      A promise of the "unfulfilled" variety.


      A fellow immortal. Outstanding!
  43. be careful... by torrents · · Score: 1

    css can consume your life...

    --
    Get your torrents...