if i was to have the following HTML:
<div>
<div>
<div>
<div>
"I want to access this div and change the background colour on a hover"
</div>
</div>
</div>
</div>
how do i access the top level div to apply styles to it without affecting the parent divs?
NB – it is for a general system where div’s are dynamically generated, therefore adding a class or id is not a solution to this particular problem.
The answer is you’re out of luck.
There is no CSS3 selector for “an element that does not contain child elements, only text”.