Hacks and Filters

Browser Specific Filters

Opera 10+ CSS Filter

 .dude:read-only { color: green; } 
 .dude:read-write /* form elements */

IE6/IE7 CSS Filter

 @media, { .dude { color: silver;} }

IE7 CSS Filter

 *:first-child+html #mytag to target IE7

IE8 CSS Filter

 @media all { .dude { color: brown\0/; } }

IE9 CSS Filter

 @media all and (monochrome: 0) { .dude { color: pink\9; } }

Webkit CSS Filter

 * > /**/ .dude, x:-webkit-any-link { color:red; } /* * > /**/ hides from IE7; remove if unneeded */

Konqueror CSS Filter

 * > /**/ .dude, x:-khtml-any-link { color:red; }  /* * > /**/ hides from IE7; remove if unneeded */

Safari 2 CSS Filter

 html body:only-child .dude

Firefox CSS Filter

 @-moz-document url-prefix { .dude { color: green; }

Firefox 3.6+ CSS Filter

 @-moz-document url-prefix { @media -moz-scrollbar-start-backward { .dude { color: green; } }

Firefox 3.0+ CSS Filter

 @-moz-document url-prefix { .dude:-moz-system-metric(scrollbar-start-backward) { color: green; } }

Legacy Browser Hacks

All web browsers are not equal and different rendering of the same code, even if the code is validated, can destroy a web page's presentation. To work around this a large community of browser hacks has been developed. These hacks should be avoided at all cost because they may break one's code in other browsers or slow down performance. However sometimes it is impossible to avoid the use of all of these hacks.

Be aware that constant browser updates may cause hacks to not work in the future.

  • Caio Hack -- hides rules from Netscape 4, even 'inline' CSS

  This article uses material from the Wikipedia page available here. It is released under the Creative Commons Attribution-Share-Alike License 3.0.

Cascading_Style_Sheets/Hacks_and_Filters
 



 

Connect with defaultLogic
What We've Done
Led Digital Marketing Efforts of Top 500 e-Retailers.
Worked with Top Brands at Leading Agencies.
Successfully Managed Over $50 million in Digital Ad Spend.
Developed Strategies and Processes that Enabled Brands to Grow During an Economic Downturn.
Taught Advanced Internet Marketing Strategies at the graduate level.


Manage research, learning and skills at defaultLogic. Create an account using LinkedIn or facebook to manage and organize your Digital Marketing and Technology knowledge. defaultLogic works like a shopping cart for information -- helping you to save, discuss and share.


  Contact Us















Warning: Unknown: write failed: No space left on device (28) in Unknown on line 0

Warning: Unknown: Failed to write session data (files). Please verify that the current setting of session.save_path is correct (/tmp) in Unknown on line 0