Wed, 2006-01-04 18:27
Hello
I have so far not been able to find the reason for using the following prefix css coding, for example:
html > {
}
body > {
}
Could somebody please explain the purpose of the > prefix and how or why it is used.
Thanks in advance.
Regards
Lynn
Wed, 2006-01-04 18:42
#1
what does this mean
Well your examples are incorrect, but it's the child selector. It's to target elements that are a direct child of the parent (not any deeper, like descendant selectors). For example:
div>strong {color: blue}
will target the first example but not the second.
<div>Here comes <strong>Santa Claus</strong>.</div> <div><p>With all of his <strong>reindeer</strong>and sleigh.</p></div>
IE will not recognize it, so it is sometimes used to feed modern browsers different information.