penders

msg:4401644 | 11:36 am on Dec 27, 2011 (gmt 0) |
The * is the universal selector; it matches any element. So your example will apply the style rule to every element.
|
spongenika

msg:4401645 | 11:40 am on Dec 27, 2011 (gmt 0) |
Thanks.
|
lucy24

msg:4401794 | 10:02 pm on Dec 27, 2011 (gmt 0) |
OK, now I'm curious. Are there any circumstances where you would legitimately do this? As opposed to, say, html {blahblah} and letting everyone else inherit from there. Are we talking size, color, what?
|
alt131

msg:4401813 | 10:38 pm on Dec 27, 2011 (gmt 0) |
he he, one of those questions where the answer begs the question ;). Not all properties inherit by default Appendix F. Full property table [w3.org], and not all versions would apply inherit even if explicitly set. Hence the popularity of variations of: * { margin:0; border:0; } But as the universal selector is very inefficient I think the real message in the question really is to ask if it is the best way to achieve the desired outcome. Legimate? I guess that depends on the code-complexity/code inefficiency trade-off edit reason Clarify
|
|