title: CSS: center element within a <div> element
body: <p>To center an HTML element I can use the CSS <code>left: 50%;</code>. However, this centers the element with respect to the whole window.</p>
  
  <p>I have an element which is a child of a <code>&lt;div&gt;</code> element and I want to center the child with respect to this parent <code>&lt;div&gt;</code>, not the whole window.</p>
  
  <p>I do not want the container <code>&lt;div&gt;</code> to have <em>all</em> its content centered, just the one specific child.</p>