How to hide CSS from buggy browsers

Here are some tricks to hide css rules from buggy browsers.

There are several browsers where all the tricks listed here don't work (maybe they are too standards compliant, maybe they have exploitable bugs that I don't know yet):

Important: As the Berlin branch of Pixelpark will soon close down, I won't be an employee of that company by the end of 2002. So my account will be removed, and this collection of "CSS hiding methods" will also close.


  1. The @import rule
  2. The media attribute
  3. The 'comment bug'
  4. The attribute selector
  5. The child selector
  6. Tantek's Hack (only to be used in connection with some NN4 hiding method)
  7. more methods
  8. Summary (Table)


Thanks to Dominik Boecker, Colin Brown, Johann Burkard, Caio Chassot, Sascha Claus, MacEditions's CodeBitch, Ian Davey, Merlin Emrys, Rijk van Geijtenbeek, Christian Jacobsson, Jukka Korpela, Michael Nahrath, Juan R. Pozo, Sven Berg Ryen, Chris Sharman, and Nick Theodorakis for comments and additions.