title: dompdf - set page margin only after first page
body: <p>I am converting an <code>HTML</code> to <code>pdf</code> file using <code>dompdf</code>. It is working fine. But the problem is that I need to have page margin for all the pages <strong>except</strong> the first page. The first page should have an image covering the whole page. But now the margin is coming for all pages including the first one. </p>
  
  <p>I am not able to disable margin for the first page. Any help is greatly appreciated. Thanks in advance.</p>
  
  <p>Below is my css</p>
  
  <pre><code>  &lt;style type="text/css"&gt;
      body { margin: 0px; }
      @page { margin: 50px; }
      #header { 
        position: fixed; 
        left: 0px; 
        top: -52px;
        height: 50px; 
        border-bottom: 2px solid #797979;
        margin: 0; 
      }
      #footer { 
        position: fixed; 
        left: 0px; 
        bottom: -52px;
        height: 50px; 
        border-top: 2px solid #797979;
        margin: 0; 
      }
      #footer .page:after { content: counter(page); }
      .firstpage { 
        position: absolute;
        page-break-after: always; 
        top: -50px;
        width: 100%;
        margin: 0;
      }
      .otherpages{ margin: 0; }
    &lt;/style&gt;
  </code></pre>
  
  <p>And here's my html  </p>
  
  <pre><code>  &lt;div class="firstpage"&gt;
       &lt;img src="pdf-bg.jpg" style="width:100%; height:auto;/&gt;
    &lt;/div&gt;
  
    &lt;div id="header"&gt;
      &lt;p&gt;&lt;?php echo date("F j, Y"); ?&gt;&lt;/p&gt;
    &lt;/div&gt;
  
    &lt;div id="footer"&gt;
      &lt;p class="page"&gt;Page &lt;?php $PAGE_NUM ?&gt;&lt;/p&gt;
    &lt;/div&gt;    
  
    &lt;div class="otherpages"&gt;
        some content
    &lt;/div&gt;
  </code></pre>