3

Using CSS alone, is it possible for a deeply subordinate html element's class, to effect the style of the document.body element.

<body>
    <div>
        <div>
            <div>
                <div class="someStatus"></div>
            </div>
        </div>
    </div>
</body>

When this deeply embedded div's class changes, I'd like to change the background color of the document.body element (as an example).

I know how to do this with JavaScript. However, is it possible using CSS exclusively?

Lonnie Best
  • 9,936
  • 10
  • 57
  • 97

0 Answers0