title: Overlay a background using pattern in CSS
body: <p>I have used the following css file to over background <code>bg.jpg</code> with a <code>repeat-x repeat-y</code> pattern of <code>dots.png</code>.</p>
  
  <pre><code>*{
      margin: 0;
      padding: 0;
  }
  body {
      margin: 0px;
      padding: 0px;
      color: #666;
      font-family: comfortaa;
      font-size: 13px;
      line-height:1.5em; 
      background-color: #fff;
      width: 100%;
      height: 100%;
      background: url(../images/bg.jpg) no-repeat;
      -webkit-background-size: cover;
      -moz-background-size: cover;
      -o-background-size: cover;
      background-size: cover;
  }
  #header {
      width: 100%;
      height: 17%;
      background: url(../images/header.png) no-repeat;
      -webkit-background-size: contain;
      -moz-background-size: contain;
      -o-background-size: contain;
      background-size: contain;
  }
  #dots{  
      width:100%;
      height:100%;
      position:fixed;
      top:0px;
      left:0px;
      background:transparent url(../images/dots.png) repeat-x repeat-y top left;
      opacity:0.6;
  }
  </code></pre>
  
  <p>Then I wrote the index.php like this:</p>
  
  <pre><code>&lt;html&gt;
  &lt;head&gt;
      &lt;title&gt;My test page&lt;/title&gt;
      &lt;link rel="shortcut icon" href="favicon.ico"&gt;
      &lt;link rel="stylesheet" href="css/style.css" type="text/css" media="screen"/&gt;
  &lt;/head&gt;
  &lt;body&gt;
     &lt;div id="header"&gt;&lt;/div&gt;
     Under Construction
     &lt;div id="dots"&gt;&lt;/div&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>But the pattern is not overlaying. What can I do to resolve this? Please help.</p>