title: html table padding/margin not working on the next page
body: <p>i have an dompdf report that use html table that is set to have the margin/padding top to 275px, to follow up with my fixed-header. But the table's margin/padding top doesn't work on the next page of the report. here's my code:</p>
  <pre><code>This is my fixed header code:
  .fixed-header{
          margin-left: 0px;
          margin-right: 0px;
          padding-top: 80px;
          position: fixed;
  }
  .fixed-header{
          top: 0;
  }
  
  And this is my table's code:
  .my-table {
          padding-top: 275px;
          margin-bottom: 25px; 
          font-size: 10pt;
  }
  </code></pre>
  <p>This is the first page (what i want it looks like)
  <a href="https://i.imgur.com/MBVkxzw.png" rel="nofollow noreferrer">https://i.imgur.com/MBVkxzw.png</a></p>
  <p>And this the second page (where the padding-top not working):
  <a href="https://i.imgur.com/m8bw1IW.png" rel="nofollow noreferrer">https://i.imgur.com/m8bw1IW.png</a></p>
  <p>My complete code:</p>
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;!DOCTYPE html&gt;
  &lt;html lang="en"&gt;
  &lt;head&gt;
  &lt;?php 
  use App\Models\Joborder; 
  use App\Models\Kapal;
  use App\Models\InvoicearpbmDetail;
  ?&gt;
      &lt;meta charset="UTF-8"&gt;
      &lt;meta name="viewport"
            content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0"&gt;
      &lt;meta http-equiv="X-UA-Compatible" content="ie=edge"&gt;
      
      &lt;title&gt;NOTA TAGIHAN / INVOICE&lt;/title&gt;
      &lt;style&gt;
          @page {
              border: solid 1px #0b93d5;
              width: 24.13cm;
              height: 27.94cm;
              font-family: 'Courier';
              font-weight: bold;
              margin-right: 1cm;
          }
  
          .title {
              margin-top: 1.2cm;
          }
          .title h1 {
              text-align: center;
              font-size: 14pt;
              
          }
          }
  
          .header {
              margin-left: 0px;
              margin-right: 0px;
              /*font-size: 10pt;*/
              padding-top: 0px;
              /*border: solid 1px #0b93d5;*/
          }
  
          .left {
              float: left;
          }
  
          .right {
              float: right;
          }
  
          .clearfix {
              overflow: auto;
          }
  
          .content {
              padding-top: 75px
          }
          .catatan {
              font-size: 10pt;
          }
  
          /* Table desain*/
          table.grid {
              width: 100%;
          }
          table.grid th{
              background: #FFF;
              text-align:left;
              /*padding-left:0.2cm;*/
              /*padding-right:0.2cm;*/
              /*border:1px solid #fff;*/
              padding-bottom:3mm;
          }
  
          table.grid tr td{
              /*padding-top:0.5mm;*/
              /*padding-bottom:0.5mm;*/
              padding-left:2mm;
              padding-right:2mm;
              /*border:1px solid #fff;*/
          }
          .list-item {
              height: 2.1in;
              margin: 0px;
          }
  
          .gfg { 
              border-collapse:separate; 
              border-spacing:0 10px; 
          } 
  
          .my-table {
              padding-top: 275px;
              margin-bottom: 25px; 
              font-size: 10pt;
          }
          
          .fixed-header{
              margin-left: 0px;
              margin-right: 0px;
              /*font-size: 10pt;*/
              padding-top: 80px;
              position: fixed;
              /*border: solid 1px #0b93d5;*/
          }
          .fixed-header{
              top: 0;
          }
          
          #header .page:after {
            content: counter(page, decimal);
          }
          
          .page_break { page-break-after: always; }
      &lt;/style&gt;
  
  &lt;/head&gt;
  
  &lt;body&gt;
      &lt;div class="fixed-header"&gt;
          &lt;div class="title"&gt;
              &lt;h1&gt;NOTA TAGIHAN / INVOICE&lt;/h1&gt;
          &lt;/div&gt;
          &lt;div class="left"&gt;
              &lt;table width="50%" style="  font-size: 10pt" border="0"&gt;
                  &lt;tr&gt;
                      &lt;td style="width: 65px"&gt;Kepada&lt;/td&gt;
                      &lt;td&gt;{{ $customer-&gt;nama_customer_po }}&lt;/td&gt;
                  &lt;/tr&gt;
                  &lt;tr&gt;
                      &lt;td&gt;Alamat&lt;/td&gt;
                      &lt;td&gt;{{ $customer-&gt;alamat }}&lt;/td&gt;
                  &lt;/tr&gt;
                  &lt;tr&gt;
                      &lt;td&gt;&lt;/td&gt;
                      &lt;td&gt;{{ $customer-&gt;alamat2 }}&lt;/td&gt;
                  &lt;/tr&gt;
                  &lt;tr&gt;
                      &lt;td&gt;&lt;/td&gt;
                      &lt;td&gt;{{ $customer-&gt;kota }}&lt;/td&gt;
                  &lt;/tr&gt;
                  &lt;tr&gt;
                      &lt;td &gt;NPWP&lt;/td&gt;
                      &lt;td&gt;{{ $customer-&gt;npwp }}&lt;/td&gt;
                  &lt;/tr&gt;
              &lt;/table&gt;
          &lt;/div&gt;
          &lt;div class="right"&gt;
              &lt;table width="50%" style="padding-left:8em; font-size: 9pt" border="0"&gt;
                  &lt;tr&gt;
                      &lt;td style="width: 115px"&gt;No Invoice&lt;/td&gt;
                      &lt;td&gt;{{ $invoicear-&gt;no_invoice }}&lt;/td&gt;
                  &lt;/tr&gt;
                  &lt;tr&gt;
                      &lt;td&gt;Tgl Invoice&lt;/td&gt;
                      &lt;td&gt;{{ $invoicear-&gt;tgl_invoice }}&lt;/td&gt;
                  &lt;/tr&gt;
                  &lt;tr&gt;
                      &lt;td&gt;No. Job Order&lt;/td&gt;
                      &lt;td&gt;{{ $invoicear-&gt;no_jo }}&lt;/td&gt;
                  &lt;/tr&gt;
                  &lt;tr&gt;
                      &lt;td&gt;No. Reff&lt;/td&gt;
                      &lt;td&gt;{{ $invoicear-&gt;no_bl }}&lt;/td&gt;
                  &lt;/tr&gt;
                  &lt;tr&gt;
                      &lt;td&gt;Kapal&lt;/td&gt;
                      &lt;?php
                          $namakapal = "-";
                          if (Auth()-&gt;user()-&gt;kode_company == '02'){
                              $job = Joborder::on('mysql_front_pbm')-&gt;where('no_joborder', $invoicear-&gt;no_jo)-&gt;first();
                              if($job-&gt;kode_kapal != null)
                              {
                                  $kapal = Kapal::on('mysql7')-&gt;where('kode_kapal', $job-&gt;kode_kapal)-&gt;first();
                                  $namakapal = $kapal-&gt;nama_kapal;
                              }
                              else
                              {
                                  $kapal = "-";
                              }
                          }else if(Auth()-&gt;user()-&gt;kode_company == '06') {
                              $job = Joborder::on('mysql_front_inf')-&gt;where('no_joborder', $invoicear-&gt;no_jo)-&gt;first();
                              if($job-&gt;kode_kapal != null)
                              {
                                  $kapal = Kapal::on('mysql10')-&gt;where('kode_kapal', $job-&gt;kode_kapal)-&gt;first();
                              }
                              else
                              {
                                  $kapal = "-";
                              }
                          }
                      ?&gt;
                      
                      &lt;td&gt;{{ $namakapal }}&lt;/td&gt;
                  &lt;/tr&gt;
                  &lt;tr&gt;
                      &lt;td&gt;Lokasi&lt;/td&gt;
                      &lt;td&gt;{{ $job-&gt;lokasi }}&lt;/td&gt;
                  &lt;/tr&gt;
              &lt;/table&gt;
          &lt;/div&gt;
      &lt;/div&gt;
          
      &lt;table class="my-table" width="100%" border="0"&gt;
          &lt;thead&gt;
              &lt;tr&gt;&lt;td colspan="4"&gt;&lt;hr&gt;&lt;/td&gt;&lt;/tr&gt;
              &lt;tr &gt;
                  &lt;td style="width: 380px;"&gt;Description&lt;/td&gt;
                  &lt;td style="width: 80px; text-align: right;"&gt;Qty&lt;/td&gt;
                  &lt;td style="width: 105px; text-align: right;"&gt;Unit Rate&lt;/td&gt;
                  &lt;td style="width: 125px; text-align: right;"&gt;Total&lt;/td&gt;
              &lt;/tr&gt;
              &lt;tr&gt;&lt;td colspan="4"&gt;&lt;hr&gt;&lt;/td&gt;&lt;/tr&gt;
          &lt;/thead&gt;
          &lt;?php
              $mobdemob = 0;
              $no = 0;
          ?&gt;
          &lt;tbody&gt;
              &lt;?php foreach ($invoiceardetail as $key =&gt; $value): ?&gt;
              &lt;?php $no += 1; ?&gt;
              &lt;tr &gt;
                  &lt;td style="width: 380px; word-spacing: -4px;"&gt;&lt;?php echo $value-&gt;keterangan ?&gt;&lt;/td&gt;
                  &lt;td style="width: 80px; text-align: right;"&gt;&lt;?php echo number_format($value-&gt;qty,'3') ?&gt;&lt;/td&gt;
                  &lt;td style="width: 105px; text-align: right;"&gt;&lt;?php echo number_format($value-&gt;harga_satuan,'2') ?&gt;&lt;/td&gt;
                  &lt;td style="width: 125px; text-align: right;"&gt;&lt;?php echo number_format(floor($value-&gt;sub_total),'0','.',',') ?&gt;&lt;/td&gt;
              &lt;/tr&gt;
              &lt;?php $mobdemob += $value-&gt;mob_demob; ?&gt;
              &lt;?php endforeach; ?&gt;
          &lt;?php
              $grand_total = $invoicear-&gt;grand_total;
          ?&gt;
              &lt;tr&gt;&lt;td colspan="4"&gt;
              &lt;div class="footer" style="padding-top: 0px"&gt;
                      &lt;br&gt;
                      &lt;hr&gt;
                      &lt;div class="left"&gt;
                          &lt;table style="padding-left:1mm; font-size:10pt; width: 55%" border="2px"&gt;
                              &lt;td&gt;Terbilang : &lt;?php echo Terbilang::make(floor($after_ppn), ' rupiah'); ?&gt;&lt;/td&gt;
                          &lt;/table&gt;
                          
                          &lt;table style="font-size:10pt; width: 60%" border="0px"&gt;
                              &lt;td style="font-size: 10px; font-family: 'Arial'"&gt;All cheques must be crossed and made out in favour of &lt;?=$nama_company?&gt; Please notify us in writing immediately should there be any discrepancies relating to the above.&lt;/td&gt;
                          &lt;/table&gt;
  
                          &lt;!--&lt;p style="font-size: 10px; font-family: 'Arial'"&gt;All cheques must be crossed and made out in favour of &lt;?=$nama_company?&gt;&lt;br&gt;--&gt;
                          &lt;!--    Please notify us in writing immediately should there be any disrepancies relating to the above.&lt;br&gt;&lt;br&gt;--&gt;
  
                          &lt;p style="font-size: 12px; font-family: 'Arial'"&gt;Please arrange to transfer the balance to our account this below :&lt;br&gt;&lt;/p&gt;
                          &lt;?php if(auth()-&gt;user()-&gt;kode_company == '02') { ?&gt; 
                          &lt;b&gt;
                          &lt;p style="font-size: 10pt"&gt;
                          BANK BANK BANK&lt;br&gt;
                          BANK BANK BANK&lt;br&gt;
                          A/C NO. 113.111.1111111&lt;br&gt;
                          BENEFICIARY : PT. BANK BANK BANK
                          &lt;br&gt;
                          &lt;br&gt;
                          BANK BANK BANK&lt;br&gt;
                          BANK BANK BANK&lt;br&gt;
                          A/C NO. 113.111.1111111&lt;br&gt;
                          BENEFICIARY : PT. BANK BANK BANK
                          &lt;br&gt;
                          &lt;br&gt;
                          BANK BANK BANK&lt;br&gt;
                          BANK BANK BANK&lt;br&gt;
                          A/C NO. 113.111.1111111&lt;br&gt;
                          BENEFICIARY : PT. BANK BANK BANK
                          &lt;/p&gt;
                          &lt;/b&gt;
                          &lt;?php }else { ?&gt;
                          &lt;b&gt;
                          &lt;p style="font-size: 10pt"&gt;
                          BANK BANK BANK&lt;br&gt;
                          BANK BANK BANK&lt;br&gt;
                          A/C NO. 113.111.1111111&lt;br&gt;
                          BENEFICIARY : PT. BANK BANK BANK&lt;br&gt;
                          &lt;/p&gt;
                          &lt;/b&gt;
                          &lt;?php } ?&gt;
                      &lt;/div&gt;
                      &lt;div class="right"&gt;
                          &lt;table style="padding-left:20mm; font-size:10pt; text-align: right"&gt;
                              &lt;tr&gt;
                                  &lt;td&gt;Total Invoice&lt;/td&gt;
                                  &lt;td&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;?php echo number_format(floor($invoicear-&gt;total_invoice),'0','.',',') ;?&gt;&lt;/td&gt;
                              &lt;/tr&gt;
                              &lt;?php if ($mobdemob &gt; 0) { ?&gt;
                                  &lt;tr&gt;
                                      &lt;td&gt;Mob Demob&lt;/td&gt;
                                      &lt;td&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;?php echo number_format($mobdemob,'0','.',',') ;?&gt;&lt;/td&gt;
                                  &lt;/tr&gt;
                              &lt;?php } ?&gt;
                              &lt;?php
                              if ($invoicear-&gt;disc_persen != 0) { ?&gt;
                                  &lt;tr&gt;
                                      &lt;td&gt;Disc (&lt;?php echo $invoicear-&gt;disc_persen ?&gt;%)&lt;/td&gt;
                                      &lt;td&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;?php echo number_format(floor($tot_disc),'0','.',',') ;?&gt;&lt;/td&gt;
                                  &lt;/tr&gt;
                              &lt;?php }
                              else if($invoicear-&gt;disc_rp != 0) { ?&gt;
                                  &lt;tr&gt;
                                      &lt;td&gt;Disc&lt;/td&gt;
                                      &lt;td&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;?php echo number_format($tot_disc,'0','.',',') ;?&gt;&lt;/td&gt;
                                  &lt;/tr&gt;
                              &lt;?php } else{ ?&gt;
                                  &lt;tr&gt;
                                      &lt;td&gt;Disc&lt;/td&gt;
                                      &lt;td&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;0&lt;/td&gt;
                                  &lt;/tr&gt;
                              &lt;?php } ?&gt;
                              &lt;tr&gt;
                                  &lt;td&gt;Uang Muka&lt;/td&gt;
                                  &lt;td&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;?php echo number_format(floor($invoicear-&gt;total_um),'0','.',',') ;?&gt;&lt;/td&gt;
                              &lt;/tr&gt;
                              &lt;!-- &lt;tr&gt;
                                  &lt;td&gt;Sub Total&lt;/td&gt;
                                  &lt;td&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;?php echo number_format($after_disc - $job-&gt;mob_demob,'0','.',',') ;?&gt;&lt;/td&gt;
                              &lt;/tr&gt; --&gt;
                              &lt;tr&gt;
                                  &lt;td&gt;Subtotal Invoice&lt;/td&gt;
                                  &lt;?php $disc = $invoicear-&gt;total_invoice * ($invoicear-&gt;disc_persen/100); ?&gt;
                                  &lt;?php $subtotal = $invoicear-&gt;total_invoice - ($disc) - ($invoicear-&gt;disc_rp) - $invoicear-&gt;total_um; ?&gt;
                                  &lt;td&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;?php echo number_format(floor($after_disc),'0','.',',') ;?&gt;&lt;/td&gt;
                              &lt;/tr&gt;
                              &lt;?php
                              if ($invoicear-&gt;ppn_persen != 0) { ?&gt;
                                  &lt;tr&gt;
                                      &lt;td&gt;PPN (&lt;?php echo $invoicear-&gt;ppn_persen ?&gt;%)&lt;/td&gt;
                                      &lt;td&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;?php echo number_format(floor($tot_ppn),'0','.',',') ;?&gt;&lt;/td&gt;
                                  &lt;/tr&gt;
                              &lt;?php }
                              else if($invoicear-&gt;ppn_rp != 0) { ?&gt;
                                  &lt;tr&gt;
                                      &lt;td&gt;PPN&lt;/td&gt;
                                      &lt;td&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;?php echo number_format($tot_ppn,'0','.',',') ;?&gt;&lt;/td&gt;
                                  &lt;/tr&gt;
                              &lt;?php } else{ ?&gt;
                                  &lt;tr&gt;
                                      &lt;td&gt;PPN&lt;/td&gt;
                                      &lt;td&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;0&lt;/td&gt;
                                  &lt;/tr&gt;
                              &lt;?php } ?&gt;
                              &lt;tr&gt;
                                  &lt;td&gt;Grand Total&lt;/td&gt;
                                  &lt;td&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;?php echo number_format(floor($after_ppn),'0','.',',') ;?&gt;&lt;/td&gt;
                              &lt;/tr&gt;
                          &lt;/table&gt;
                          &lt;br&gt;&lt;br&gt;
                          &lt;div class="tgl" style="font-size: 10pt"&gt;
                              &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Palembang, &lt;?php echo date_format($date,'d/m/Y');?&gt;
                          &lt;/div&gt;
                          &lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;
                          &lt;p style="font-size: 10pt"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;?=$nama_company?&gt;&lt;/p&gt;
                      &lt;/div&gt;
                  &lt;/div&gt;
              &lt;/td&gt;&lt;/tr&gt;
          &lt;/tbody&gt;
      &lt;/table&gt;
  &lt;/body&gt;
  &lt;/html&gt;</code></pre>
  </div>
  </div>
  </p>
  <p>is there any solution to this?</p>