> 
> **Possible Duplicate:**  
> 
> [Is there a CSS parent selector?](https://stackoverflow.com/questions/1014861/is-there-a-css-parent-selector) 
> 
> 
> 

I know this is a shot in the dark, but is there a way, using css only, CSS2, no jquery, no javascript, to select and style an element's ancestor? I've gone through the selectors but am posting this in case I missed something or there is a clever workaround.

For example, say I have a table with classname "test" nested inside a div. Is there some sort of:

```html
<div>
    <table class="test">
    </table>
</div>

```

```js
div (with child) .test
{
     /*styling, for div, not .test ...*/
}

```