title: select even/odd class element
body: <p>I want a selector that selects the element that has elementWrapper as parent. If the parent element is even, make the child element float right, if its odd, make it float left.</p>
  
  <p>The result should look something like this:</p>
  
  <pre><code>    &lt;body&gt;
          &lt;style&gt;
              .elementWrapper
              {
                  width:100%;
                  height:100px;
              }
  
              header, nav, div div, footer
              {
                  width:50%;
                  height:100px;
                  background:#000;
              }
          &lt;/style&gt;
          &lt;div class="elementWrapper"&gt;
              &lt;header style="float:left;"&gt;&lt;/header&gt;
          &lt;/div&gt;
          &lt;div class="elementWrapper"&gt;
              &lt;nav style="float:right;"&gt;&lt;/nav&gt;
          &lt;/div&gt;
          &lt;div class="elementWrapper"&gt;
              &lt;div style="float:left;"&gt;&lt;/div&gt;
          &lt;/div&gt;
          &lt;div class="elementWrapper"&gt;
              &lt;footer style="float:right;"&gt;&lt;/footer&gt;
          &lt;/div&gt;
      &lt;/body&gt;
  </code></pre>
  
  <p>Is this possible with css selectors or should I use js here?
  <a href="http://jsfiddle.net/JohnDoe/4sBkZ/" rel="nofollow">JSFiddle</a></p>