Originally Posted by Paul O'B
Would you rephrase it in English?
What does "asterisk(*)" mean here?
| SitePoint Sponsor |





Originally Posted by Paul O'B
Would you rephrase it in English?
What does "asterisk(*)" mean here?
* means the root element of a document. In the case of HTML and XHTML, it's the <html> element. That code really means "look for #header inside of an html element inside the root element of the document".
Now you might be saying "That doesn't make sense! <html> will never be inside of <html>!" Well, you're right, but IE isn't and will apply the style as if the asterisk wasn't in that selector, while all other browsers will apply it properly (meaning they won't apply the style to anything).





Great examplanation, I always wondered what it actually meant.![]()


As Vinnie syas in the above example * means the root element but just in case anybody thinks that's what it always mean then I might just add this:
* = universal selector and is like a wildcard that means it stands for any and every element that could be put in its place.
e.g.
body div * p {color:black}
This would match any paragraphs that are grandchildren of the div. It would not match paragrpahs that are children of the div.
For more info have a look here:
http://www.meyerweb.com/eric/article...v/200006a.html
and for the sbmh have a look here:
http://www.info.com.ph/~etan/w3panth...ifiedsbmh.html
Paul
Bookmarks