CSS select element within multiple imbricated classes

css, css-selectors, html

Solution

`.pick .myClass { /* style */ }` will do the job. There is no need to add all the classes till the one you wish to select.

Problem

I have a html page that contains a structure like this: ``` <table class="pick"> <tr> <td> <div class="class1"> <div class="class2"> <div class="myClass"></div> </div> </div> </td> <td> <div class="class1"> <div class="myClass"></div> </div> </td> </tr> </table> ``` how can I select the elements that are inside the element with `myClass` class which is inside the `pick` class, but the structure of the `div` elements is variable, as in the code example? I probably need something like this: `.pick .something_else .myClass { /*style*/ }` but I don't know exactly what.

Original source