Typophile

Honing CSS skills

webdesignm

I think I have got to a point with Css where I can build anything I or someone else have designed, my codes validates and also work in older versions of IE.

However, I can't help thinking that I'm still not there yet because my codes doesn't look the same as my web designer collegues. Their codes have a lot of '!important' and '-moz' and they use z-index and mainly position elements. I've never used !important and -moz and z-index in my codes (never had to) and I tend to float most things which they've already told me I shouldn't do.

The books I've read haven't taught me the above. Should I be coding like how they are? I would like to get really advanced at CSS.

So what advanced books out there should I be looking at reading? I'd like something quite new that also has a small snippet of Css3 but I want the focus to be Css2.1.

This book looks like it's inline with what I'm looking for Smashing CSS: Professional Techniques for Modern Layout - Eric Meyers

Anyone read it? Can anyone recommend anything else?

P.s - I have read CSS Mastery - I'd like something even more advanced.

There's good CSS and bad CSS. It sounds a lot like you've found the path to good CSS. Don't feel like you have to emulate the hacks and workarounds of your colleagues. If you're getting good feedback from clients, back-end developers, and users, and your code works on the browsers it needs to, then you're doing great.

--John

Most of time, having lots of !important declarations indicate a poor understanding of the cascade. But of course, it can be used in an appropriate way, too.

The z-index comes with positioned – and stacked/overlapping – elements. It depends on your design ideas and intentions whether you need it or not. You sure can do splendid things without it.

Vendor-specific prefixes like -moz can be used to serve declarations that haven’t been standardized (yet) to certain browsers that already understand them.

Captured from web.archive.org on 17 Jun 2011. view this capture