Edit in JSFiddle

<div id="bar">
  <div class="foo">
    Nam pretium turpis et arcu 
  </div>
</div>
#bar{ /* Specificity: 0,1,0,0 */
  color: red;
}
.foo{ /* Specificity: 0,0,1,0 */
  color: green;  
}