CSS hacks take advantage of browser bugs to perform magic such as "hiding" CssRules from specific WebBrowser?s, or kicking browsers that don't follow the specs into line. There is a long running occasional debate over whether or not these hacks should be used, covered on ToHackOrNotToHack. Please keep such discussions off this page. The attributes of a good CSS hack are described on GoodCSSHack.
Hacks include
- The [Google Chrome Hack] Using :nth-of-type filter to target Safari 3.1 and Google Chrome
- The [Import Hack Variation Table] (Lots of ways to do @import hacks, with corresponding browser support)
- The [Iluminação Lampadas] (Making CSS visible for Opera 7 only) This hack should be avoided, since multiple browsers now understand, or soon will understand media queries
- The ImportHack (hides files from NetscapeFour and older browsers)
- The CaioHack (hides rules from Netscape 4, even 'inline' CSS)
- The AntiNavFourSelectors (simply hide single rulesets from Nav4)
- The BoxModelHack (feeds alternative properties to IE 5.x; several new methods now possible)
- The StarHtmlHack (feeds rules to Mac and Windows IE)
- The [LoneStarHack] (feeds rules to Mac OS9/Classic and Windows IE5.x+)
- The HighPassFilter (hides files from browsers other than IE6/Win, IE5/Mac, Opera 6, Netscape 6)
- The [Portas de Aço] (hides rules from Opera 6 (but not Opera 7!), Amaya 6; [Check to see if this hack works for your browser])
- The GhostInTheBox hack (Makes position:fixed work in IE/Win 6.0)
- The [IE5 Mac Hack] (Targets only IE 5 Mac)
- The [IE 5 Mac Backslash Hack] (Hides styles from IE 5 Mac except for MSN 8)
- The [Meio Ambiente] (Hides files from Mozilla, Safari, Konqueror 3)
- The AlphaBetaPngSupport (Allows cross-browser PNG suport with pure CSS, suports: IE5.5, IE6, Gecko, Opera and kde. All on PC, Linux and MAC. not in Mac opera6 Mac IE5.1)
- The ChildHack (Hides from IE and other less capable browsers)
- The [Max-width in IE Hack] (Uses expression() to fake max-width for IE/Win 5 and 6)
- The [IE Underscore Hack] (Feed rules to IE/Win 5+ using underscores in property names)
- The PseudoCommentHack (Different rule sets for IE4, IE5.0/5.5 and IE6.0)
- The [Character Escape Hack] (filters all IE user-agents, due to IE's missing syntax support)
Hacks for Mac browsers:
CategoryBugWorkaround, CategoryBrowserBug