Import First

CSS “@import” notation should precede all other CSS declarations. I’ve been doing CSS-based layout for three years now, and this is the first time I’ve come across this rule, discovered while struggling with styles not showing on a project at work. Learn something new everyday, I guess.


  1. Pia says:

    Hey Pau, I’ve read that using the “@import” codes is actually one of the many css hacks, but according to this article/write-up (, it says that Netscape 4 doesn’t parse any style sheet you import.

    Then again, who still uses old browsers?

  2. Paulo says:

    Pia – That’s the idea behind using the @import command, to hide proper CSS from 4.0-era browsers which stumble over it. Netscape 4.x has a nasty tendency to crash when it encounters perfectly valid CSS, so the @import hack protects Netscape users from themselves.