title: How to select label for checked checkbox using CSS?
body: <p>I'm composing a stringbuilder on serverside (HTML code) and by ajax sending a response to jquery function that puts this HTML in place. On serverside is decided which checkbox will be checked. So far so good.</p>
  
  <p>I would like to select labels for checked checkboxes and change colour so checked countries would be differently coloured. My trouble is that I can't select desired labels and change color property. I tried with this what you see and of course using classes and <code>+</code> and <code>&gt;</code> and <code>:before</code> and other weird things...</p>
  
  <p>So, how to select them and change any property on the label?</p>
  
  <p>I would like to do it using CSS, I know how to do it using jquery but it seems so wrong.</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-css lang-css prettyprint-override"><code>label + input.chkCountry[type="checkbox"]:checked  {color:green;}</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;ul class="chkbox"&gt;
    &lt;li&gt;&lt;label class="lblCountry" for="chkCC_AF"&gt;&lt;input type="checkbox" class="chkCountry" id="chkCC_AF" name="chk_AF" value="AF" checked="checked"&gt;Afghanistan&lt;/label&gt;&lt;/li&gt;
    &lt;li&gt;&lt;label class="lblCountry" for="chkCC_AL"&gt;&lt;input type="checkbox" class="chkCountry" id="chkCC_AL" name="chk_AL" value="AL"&gt;Albania&lt;/label&gt;&lt;/li&gt;
    &lt;li&gt;&lt;label class="lblCountry" for="chkCC_DZ"&gt;&lt;input type="checkbox" class="chkCountry" id="chkCC_DZ" name="chk_DZ" value="DZ"&gt;Algeria&lt;/label&gt;&lt;/li&gt;
    &lt;li&gt;&lt;label class="lblCountry" for="chkCC_AS"&gt;&lt;input type="checkbox" class="chkCountry" id="chkCC_AS" name="chk_AS" value="AS"&gt;American Samoa&lt;/label&gt;&lt;/li&gt;
  &lt;/ul&gt;</code></pre>
  </div>
  </div>
  </p>