My second book (after Ian’s) was another SitePoint book (total accident) called HTML Utopia: designing without tables using HTML and CSS by Dan Shafer and Rachel Andrews.
First half of the book was very similar to Ian’s in that it explained very basic basics… second half of the book was where I learned more: they started with some good (x)HTML and showed how to style boxes and position them (make sidebars, footers, etc). It went only very briefly into floats, just enough to get you in trouble, but I found the explanation at the time very enlightening (why a footer didn’t stay underneath a float for example).
I also have a book over the CSS zen garden called The Zen of CSS which, each section goes over code used in particular Zen Garden submissions… this showed me a lot of techniques that I later used. Book by Dave Shea and I think Molly Hol… can’t spell it and internet is too slow to look it up now. The Molly.com woman. : )
After that, I learned by reading posts on forums (and attempting my own answers, which wherever they were wrong, the Crusties who knew better would correct me), and since I had enough basics I could read technical articles (like at alistapart.com or css-tricks.com or wherever… Paul O’B has some articles on search-this.com that I have bookmarked) and actually get something from it.
Deathshadow used to do his rewrites on another forum and I learned a lot from many of them. Esp. one of his is where I learned a good image-replacement sprite technique… my connection is really poor now but you can find this thread if you search for “digitalpoint pixelcommander deathshadow” and read it.
I know dev.opera.com has somewhere a whole learning section regarding CSS… I never learned from it as it came much later but I can guarantee there’s no w3schools-type cruft in it.
Stay AWAY from w3schools.com. It has nothing to do with the W3C and there are still enough bugs and misinformation in among all the correct stuff that it will still lead you astray.
But a large part I learned on the job, by trying to build stuff (again, after I had some basic knowledge) and getting errors, mistakes, and screwiness. Also, seeing other people’s code and the screwiness they were getting.
You’ll want to build on a server so everything your test browsers see is “live”. We get plenty of threads asking why something which worked locally suddenly doesn’t when live… might as well skip that pain if you’re busy learning CSS.
I learned without stuff like Firebug but I’d say go ahead and learn to use it at least to “see” your boxes and their margins better (you can always see padding if you give a box a background colour, and I do this a lot when dealing with floats (HINT HINT this is a good trick), but Firebug and other browser dev tools will highlight margins for you as well, and sometimes for example you’ll see them sliding up behind some other element which suddenly explains why you aren’t seeing the space you were trying to code in!) so you can see the effects of your code.
I use the web developer toolbar plugin in firefox to test stuff easily… removing images and css and JS, quick resizing of browser windows, viewing generated source to see error rendering and post-javascript HTML…
Keep asking questions. Notice those of us with fancy badges are still asking questions. It never ends.
Lemme see what I have in my bookmarks…
Get Specific with Your CSS Styles » SitePoint specificity is what makes CSS great, but it will also make you cry.
On having layout Haslayout is important if you are coding for IE6 or 7, or any IE in Quirks mode.
The code for dropdown menus at htmldog.com is still pretty good. They are missing a :hover “trigger” for IE7 if you choose not to use their Javascript (which otherwise is only there for IE6 to get around a bug… no way around it otherwise) and the Opera bug may be gone, but
Son of Suckerfish Dropdowns | HTML Dog
Gary Turner has a few good articles on his dev site: Enclosing Float Elements | Floats | HTML & CSS Workshop | Gary Turner web development example
SitePoint Forums - View Single Post - Sticky Thread Revision March 2010 - Read before posting - CSS FAQ - Tips etc… Paul’s All About Floats (floats are an important tool that you’ll be using, along with margins, for the majority of your layouts).
Sliding Doors Meets CSS Sprites Sliding doors techniques.
Old explanation (and scroll down to see visually) of inline box models: David’s Inline Box Model
You notice most of these are rather specific, and assume you already know stuff. In the beginning it’s a bit of bootstrapping which is why I’m glad I started with my two books.
Several others here have good places they know on the web to get started. Let’s hear them.
Also, post code you get that IS working around here and we’ll break it down and show you where you’re still bloated or getting the right result for the wrong reason or whatever.