Last month, a discussion popped up on the CSS list about organization of CSS files. This is a discussion that comes up from time to time on that list and in smaller development discussions.
I don't think that my way is necessarily better than any other, but I thought I would share it. If for no other reason than to open up the discussion.
One method that I have seen is to divide up the files into "modules": forms.css, layout.css, tools.css, typo.css. This seems nice, but leads to a few problems.
Ben Forta is asking for input on his next CFWACK book. The discussion in the comments reminded of the old CFML Reference that I keep with me. It is one of a few books that I always have near my computer when I travel.
- CSS Pocket Reference (outdated, but still handy when I can't remember some bit of syntax)
- ColdFusion Quick Reference Guide to CFML (no longer in print, but still handy to jog my memory a bit)
- Regular Expressions in 10 Minutes (Forta strikes again!)
- SQL Pocket Reference (perhaps the least used of the bunch, but I still like to have it)
- The Elements of Style (I don't write the copy, but it has still been handy)
These books taken together weigh less than a pound and take up less space than your average computer book. They have still managed to be tremendously useful when I am working on the road (especially if I am trying to get some work done with no internet connection).
Anyone else have suggestions for books that they don't leave home without?
Microsoft is working on Internet Explorer 7 and in an entry on the IEBlog, they mention the possibility of existing hacks for IE breaking pages in IE7.
If you are currently using a doctype that triggers IE's quirks mode, your site won't be affected. If you are using standards mode and hacks for IE, however, it might be.
The reason for this is that IE is trying to make their standard mode more standards compliant. They recommend using conditional comments instead of CSS hacks.
Find out more information at "IEBlog: A Call to action: The demise of CSS hacks and broken pages".
All in all, this is the kind of change that people have long been asking for from Redmond, but if you are using standards mode the transition could be rocky unless you prepare now.
This is a quick reference on how to use CSS. We've no time for long explanations, so I will include a few other resources for that sort of stuff.
For details on CSS properties, see the w3schools CSS Reference or the DevGuru CSS Index.
You can also read An Introduction to CSS on the W3C's site (they are in charge of standards on the web).
Enough of that, We're trying to get some work done here!
Eric Meyer has discovered some values that can cause problem in Internet Explorer on Windows, due to the way it handles scripting. His blog entry touches on an explanation and shows some examples.
In case you aren't up to reading any more, just avoid the following values in your id attributes: "tags","urns","item","namedItem" (and maybe "top").
Reserved ID Values?
I have been a fan of the CSS Zen Garden for a long time. Recently, however, I have noticed that most of the examples are practical for real-world sites where the content changes from page to page and over time. Chris Heilmann has noticed as well.
CSSZenGarden.com is a great example of what CSS can be in an ideal situation. CSS Zen Garden shows what CSS can do for a one-page site whose content never changes. That isn't the world most of us deal with. Most of us deal with sites with multiple pages where the content changes from time to time.
Enter CSS Factory, a real-world alternative to the Zen Garden.
Right now, CSS Factory is just an idea.
While I think it is a great idea, a few points do concern me:
- Chris mentions changing content order. So long as the order changes only for the content-area and not the template stuff (navigation, pieces that don't change from page to page), I think that is great.
I would also offer some suggestions:
- Suggest (impose?) a total page-weight of 40K (34K is the suggested page-weight for 10 seconds on 56K modem)
- Recognize the specialization of talent in the modern web and give separate credit for design and code. This would allow more entries as designers and coders could collaborate on projects.
I certainly hope CSSFactory comes to fruition. If you have any thoughts, let Chris know on his blog.
Eyetools Research is running an eyetracking analysis on CSS Zen Garden. Their eyetracking analysis shows where users actually look on a web page. CSS Zen Garden shows the same content (indeed, the same HTML) with multiple designs.
The nice thing about an eyetrack study of CSS Zen Garden is that it is possible to see how people react to the same exact content in different designs. So far, they have tested the original design and one other. They are taking votes for what designs to test next.
If you haven't done so yet, you might want to check out the Eyetools blog. If you are interested in CSS Zen Garden, you might want to look at the CSS Zen Garden book.
I just saw an announcement that a book on CSS Zen Garden has been released. For those of you that don't know, CSS Zen Garden is a very nifty site that can be viewed in several different designs (568 at the time of this writing). All of the designs use the exact same HTML, only the CSS changes. If you haven't been to the site before, I highly recommend you take a look.
The book is written by the founder of CSS Zen Garden, Dave Shea and by popular author, instructor and web designer, Molly E. Holzschlag. Dave Shea has some pictures of the book on his site. Digital Web has a good review of the book.
Sorry for the lack of posts recently, trying to get caught up on paying work.
Someone recently posted a link an article on the Web Standards Group mail list. The article, "Common Coding Problems with HTML and CSS", does a really good job of summarizing issues the possible issues in CSS/HTML web sites (most of them IE bugs).