title: How to apply a background to a DIV, but keep child image background transparent
body: <p>I want a div as my header with a centred image and a background colour, but I don’t want the background colour to show through the image.</p>
  
  <p>html:</p>
  
  <pre><code>&lt;div id="header"&gt;
    &lt;a href="home.html"&gt;&lt;img id="headerpic" src="images/logo.png"&gt;&lt;/a&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>css:</p>
  
  <pre><code>#header {
      opacity: 0.5;
      width: 100%;
      height: 150px;
      margin-bottom: 50px;
      background-color: #000;
  }
  #headerpic {
      height: 100%;
      display: block;
      margin-left: auto;
      margin-right: auto;
      background-color: none;
  }
  </code></pre>
  
  <p>Please help D:</p>