CSS hack: Difference between revisions

Content deleted Content added
Line 91:
Versions of Internet Explorer before version 7 do not support the "child selector" (<code>></code>), allowing rules to be specified for all browsers except Internet Explorer. For example, this rule will turn paragraph text blue in Firefox, but not in IE.
html&gt;body p {color: blue; }
 
===== Negation pseudo class hack =====
All versions of Internet Explorer and Opera do not support the "negation pseudo class" (<code>not()</code>).
<pre>
.yourSelector {
color: black;
} /* values for IE */
 
html:not([dummy]) .yourSelector {
color: red;
} /* values for Safari and Firefox */
 
@media all and (min-width: 0px) { #adminmenu a {
color: blue;
} } /* values for Opera */
</pre>
 
==== Criticisms of Hacks ====