title: Safari Printing differently than Chrome + Firefox (html/css)
body: <p>I am attempting to have barcode sheet printing for avery 5160/8160 via browser. I found and modified code from 
  <a href="https://boulderinformationservices.wordpress.com/2011/08/25/print-avery-labels-using-css-and-html/" rel="nofollow noreferrer">https://boulderinformationservices.wordpress.com/2011/08/25/print-avery-labels-using-css-and-html/</a></p>
  
  <p>It works exactly how I want in Firefox + Chrome; but in Safari it prints off center both vertically and horizontally.</p>
  
  <p>Is the only option to detect the user agent and have code just for Safari? Does Safari have different ways of measuring inches?</p>
  
  <p>Here is output from chrome:</p>
  
  <p><a href="https://i.stack.imgur.com/l8MXJ.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/l8MXJ.jpg" alt="Chrome Chrome"></a></p>
  
  <p>Here is output from safari:</p>
  
  <p><a href="https://i.stack.imgur.com/3NpOe.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/3NpOe.jpg" alt="Safari Output"></a></p>
  
  <p>Here is code used:</p>
  
  <pre><code> &lt;style&gt;
  
   @media print
   {
      html
      {
          margin: 0;
          padding: 0;
      }
  
      body {
           width: 8.5in !important;
           margin: .5in .1875in 0 .1875in !important;
          }
  
          .hidden-print
          {
              display: none;
          }
  
         @page {
           margin: 0;
           padding: 0;
         } 
      }
  
  
   .barcode-label{
        -webkit-box-sizing: content-box;
        -moz-box-sizing: content-box;
        box-sizing: content-box;
       width: 2.325in;
       height: 1.02in;
       padding: .015in .15in 0 .15in;
       margin-right: .195in;
        font-size: 10pt;
       float: left;
        line-height: 1em;
        letter-spacing: normal;
  
       text-align: center;
       overflow: hidden;
  
       outline: 1px dotted;
       }
  
       .page-break  {
       clear: left;
       display:block;
       page-break-after:always;
       }
   &lt;/style&gt;
  
   &lt;h1 class="hidden-print" style="text-align: center;"&gt;Avery 8160 &lt;?php echo lang('common_template');?&gt;&lt;/h1&gt;
  &lt;div class="hidden-print" style="text-align: center;margin-bottom: 10px;"&gt;
      &lt;button class="btn btn-primary text-white hidden-print" id="print_button" onclick="window.print();"&gt;&lt;?php echo lang('sales_print'); ?&gt;&lt;/button&gt; 
  &lt;/div&gt;
  
  
   &lt;div class='barcode-label'&gt;PHP Point Of Sale, LLC&lt;br /&gt;
      &lt;img src='http://home.chrismuench.com/phppos/PHP-Point-Of-Sale/index.php/barcode?barcode=0000000001&amp;text=0000000001&amp;scale=1' /&gt;&lt;br /&gt; 
          &lt;span style="font-size:12pt;"&gt;$11.20&lt;/span&gt;: test
   &lt;/div&gt;
  
   &lt;div class='barcode-label'&gt;PHP Point Of Sale, LLC&lt;br /&gt;
      &lt;img src='http://home.chrismuench.com/phppos/PHP-Point-Of-Sale/index.php/barcode?barcode=0000000001&amp;text=0000000001&amp;scale=1' /&gt;&lt;br /&gt; 
          &lt;span style="font-size:12pt;"&gt;$11.20&lt;/span&gt;: test
   &lt;/div&gt;
  
   &lt;div class='barcode-label'&gt;PHP Point Of Sale, LLC&lt;br /&gt;
      &lt;img src='http://home.chrismuench.com/phppos/PHP-Point-Of-Sale/index.php/barcode?barcode=0000000001&amp;text=0000000001&amp;scale=1' /&gt;&lt;br /&gt; 
          &lt;span style="font-size:12pt;"&gt;$11.20&lt;/span&gt;: test
   &lt;/div&gt;
  
   &lt;div class='barcode-label'&gt;PHP Point Of Sale, LLC&lt;br /&gt;
      &lt;img src='http://home.chrismuench.com/phppos/PHP-Point-Of-Sale/index.php/barcode?barcode=0000000001&amp;text=0000000001&amp;scale=1' /&gt;&lt;br /&gt; 
          &lt;span style="font-size:12pt;"&gt;$11.20&lt;/span&gt;: test
   &lt;/div&gt;
  
   &lt;div class='barcode-label'&gt;PHP Point Of Sale, LLC&lt;br /&gt;
      &lt;img src='http://home.chrismuench.com/phppos/PHP-Point-Of-Sale/index.php/barcode?barcode=0000000001&amp;text=0000000001&amp;scale=1' /&gt;&lt;br /&gt; 
          &lt;span style="font-size:12pt;"&gt;$11.20&lt;/span&gt;: test
   &lt;/div&gt;
  
   &lt;div class='barcode-label'&gt;PHP Point Of Sale, LLC&lt;br /&gt;
      &lt;img src='http://home.chrismuench.com/phppos/PHP-Point-Of-Sale/index.php/barcode?barcode=0000000001&amp;text=0000000001&amp;scale=1' /&gt;&lt;br /&gt; 
          &lt;span style="font-size:12pt;"&gt;$11.20&lt;/span&gt;: test
   &lt;/div&gt;
  
   &lt;div class='barcode-label'&gt;PHP Point Of Sale, LLC&lt;br /&gt;
      &lt;img src='http://home.chrismuench.com/phppos/PHP-Point-Of-Sale/index.php/barcode?barcode=0000000001&amp;text=0000000001&amp;scale=1' /&gt;&lt;br /&gt; 
          &lt;span style="font-size:12pt;"&gt;$11.20&lt;/span&gt;: test
   &lt;/div&gt;
  
   &lt;div class='barcode-label'&gt;PHP Point Of Sale, LLC&lt;br /&gt;
      &lt;img src='http://home.chrismuench.com/phppos/PHP-Point-Of-Sale/index.php/barcode?barcode=0000000001&amp;text=0000000001&amp;scale=1' /&gt;&lt;br /&gt; 
          &lt;span style="font-size:12pt;"&gt;$11.20&lt;/span&gt;: test
   &lt;/div&gt;
  </code></pre>