Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world (or not, you can keep them private!)
Using various hack management techniques publicized by Doug Bowman and Molly Holzschlag, this is the default stylesheet I to in the head of my markup:
/*
[CLIENT] screen master
*/@importurl("core.css");/* Import WinIEx-only bugs - hide from Mac IE5 \*/@importurl("hacks.win.iex.css");/* END hide from Mac IE5 *//* Import Win IE5x hacks
---------------------
*/@mediatty{i{content:"\";/*""*/}} @import 'hacks.win.ie5.css'; /*";}}/* *//* Import Mac IE5 hacks
--------------------
*//*\*//*/
@import url("hacks.mac.ie5.css");
/**/
The core.css file contains my pure, "hack free" CSS. The other files referenced above contain any and all browser-specific hackery required to make IElesser browsers behave properly.
Sometimes you just have to resort to the hacks; this bit of code will let you feed three separate values for the same property to each of the three common flavors of IE on Windows:
The first value will be applied by IE5.5, the second by IE5.0 and the third by IE6.0. The order is important; mix them up and it won't work. The "* html" on the selector ensures that only IE on Windows will see any of the values (since it mistakenly thinks there's a higher root element above html).
This was constructed from the table of CSS hacks at dithered.