title: Change checkbox label css property with checkbox checked
body: <p>I have the following html:</p>
  
  <pre><code>  &lt;label&gt;
       &lt;input type="checkbox" value="cb_val" name="cb_name"&gt;
       my checkbox text
    &lt;/label&gt;
  </code></pre>
  
  <p>With CSS I added a background-color to the <code>&lt;label&gt;</code> tag.</p>
  
  <pre><code>label { background-color:#333; color:#FFF; }
  </code></pre>
  
  <p>Now I'd liked to change the background color of the label when the checkbox is checked.
  I know how to do it with javascript, but is there a way to to it just using CSS?</p>
  
  <p>I have seen some solutions, but they use the adjacent sibling selector and only work when the label appears after the checkbox.</p>
  
  <p>I still hope to fix this without javascript, does anyone have a clue?</p>
  
  <p><strong>UPDATE:</strong></p>
  
  <p>As I was afraid of, it cannot be done this way, so i must do it with JS, or achieve the same visual effect with a different HTML structure.
  I want to set the background color of the label and the textbox in one go, so I can go with a solution where the checkbox is placed absolute on top of the label. Good point PlantTheldea!</p>
  
  <p>Or I can apply the background color to the label and the checkbox both.</p>
  
  <p>Thanks everyone!</p>