Star7 Hack

Test of Filter

This text will be green if the rule has been applied.

Code Syntax

html*#testElement {
   color: #00cc00;

Browser Support / Behaviour

Applied By

Not Applied By


Special Notes / Browser Specific Behaviour

Unlike many selectors that use punctuation characters (like the child selector >, the adjacent sibling selector +, and others), the universal selector must be separated from other selectors in the same rule by whitespace if rules that contain it are to validate. A space, however, is not required between the universal selector and a class or id selector (however, the W3C validator appears to think that the universal selector isn't there in this case - see the validation result of html *#test { color: red; }). The star7 hack relies on it's lack of whitespace between the html and the universal selector for it's particular browser-support profile. Adding the whitespace in an effort to validate rules using this hack will change it's profile and it becomes the HTML Star selector filter (except Opera 3.5 will apply a rule in the form html * selector but will ignore html *selector).

The name comes from the fact that it can be used to hide rules from Opera 7 while applying them to other modern browsers.

More information