Reputation: 85545
I have a nested html like this:
<div id="feautred">
<div></div>
<p></p>
<ul></ul>
<dl></dl>
</div>
For normal markup I could use #featured > div
but here is not only the div is nested. There may be anything. So, how can I use #featured > ????
selector here?
Doing #featured > *
will select all inner children what I don't need! I want only main children elements to be selected.
Upvotes: 1
Views: 48
Reputation: 472
Maybe something like this?
#featured + p { }
This will select all paragraphs that are following #featured.
Upvotes: 0
Reputation: 125620
You can use *
:
#features > *
from specification:
The universal selector, written as a CSS qualified name [CSS3NAMESPACE] with an asterisk (
*
U+002A) as the local name, represents the qualified name of any element type.
Upvotes: 5