I propose to create previous selector in next level
like this: <div id=“div1”></div> <div id=“div2”></div>
style “#div2” element, apply “#div1” element.
I propose to create previous selector in next level
like this: <div id=“div1”></div> <div id=“div2”></div>
style “#div2” element, apply “#div1” element.
I can’t tell what you’re actually trying to suggest here.
I agree I don’t understand what he is trying to imply. But a syntax for parent selector would be immensely useful. For example, something like the following div < .tab-content
would result in selecting the parent div of the given selector.
Chris Coyier wrote an article about this http://css-tricks.com/parent-selectors-in-css/
We dropped that particular syntax. We replaced it with jQuery’s :has()
syntax, which is equivalent in power. (Always look at the Editor’s Draft rather than the TR version.)
So @rvinay88’s example would be div:has(> .tab-content)
, and if @p4bl1t0 is right about what the OP was intending, it would be written #div1:has(+ #div2)
.