title: CSS/Firefox - How can I get table cell borders to show up when printing more than one page?
body: <p>I have an html document in which I am testing printing a table that spans a couple of pages when printed.  Unfortunately, in Firefox, the cells lose their border.</p>
  
  <p>Here is my html with dummy data.</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
  
      &lt;head lang="en"&gt;
  
          &lt;style type="text/css" media="print"&gt;
              table{
                  border-collapse:collapse;
              }
              td,th{
                  border:1px solid black !important;              
              }
          &lt;/style&gt;
  
      &lt;/head&gt;
      &lt;meta charset="utf-8"/&gt;
      &lt;body&gt;
  
          &lt;table&gt;
              &lt;thead&gt;
                  &lt;tr&gt;
                      &lt;th&gt;Title&lt;/th&gt;
                      &lt;th&gt;Type&lt;/th&gt;
                      &lt;th&gt;Author&lt;/th&gt;
                      &lt;th&gt;Editor&lt;/th&gt;
                      &lt;th&gt;Year&lt;/th&gt;
                      &lt;th&gt;ISBN&lt;/th&gt;
                      &lt;th&gt;Revision&lt;/th&gt;
                      &lt;th&gt;Reviewer Score&lt;/th&gt;
                      &lt;th&gt;Last Edited By&lt;/th&gt;
                      &lt;th&gt;Comments&lt;/th&gt;
                  &lt;/tr&gt;
              &lt;/thead&gt;
  
              &lt;tbody&gt;
                  &lt;tr&gt;
                      &lt;td&gt;Test&lt;/td&gt;
                      &lt;td&gt;Test&lt;/td&gt;
                      &lt;td&gt;Test&lt;/td&gt;
                      &lt;td&gt;Test&lt;/td&gt;
                      &lt;td&gt;Test&lt;/td&gt;
                      &lt;td&gt;Test&lt;/td&gt;
                      &lt;td&gt;Test&lt;/td&gt;
                      &lt;td&gt;Test&lt;/td&gt;
                      &lt;td&gt;Test&lt;/td&gt;
                      &lt;td&gt;Test&lt;/td&gt;
                  &lt;/tr&gt;
                  ......
                  &lt;tr&gt;
                      &lt;td&gt;Test&lt;/td&gt;
                      &lt;td&gt;Test&lt;/td&gt;
                      &lt;td&gt;Test&lt;/td&gt;
                      &lt;td&gt;Test&lt;/td&gt;
                      &lt;td&gt;Test&lt;/td&gt;
                      &lt;td&gt;Test&lt;/td&gt;
                      &lt;td&gt;Test&lt;/td&gt;
                      &lt;td&gt;Test&lt;/td&gt;
                      &lt;td&gt;Test&lt;/td&gt;
                      &lt;td&gt;Test&lt;/td&gt;
                  &lt;/tr&gt;
              &lt;/tbody&gt;
  
          &lt;/table&gt;
      &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>It oddly works in Internet Explorer and Google Chrome.
  I realize that this was asked elsewhere, but sadly nothing seems to work.</p>
  
  <p>On this page:</p>
  
  <p><a href="https://stackoverflow.com/questions/3469693/html-css-table-borders-appearing-on-screen-but-not-in-printout">html/css: table borders appearing on screen but not in printout?</a></p>
  
  <p>I tried a solution found in the comments using @media.</p>
  
  <p>However, this doesn't work as it seems to break the css.  Maybe I'm inserting this wrong?</p>
  
  <pre><code>    &lt;head&gt;
          &lt;style&gt;
              @media.print{
                  table{
                      border-collapse:collapse;
                  }
                  td,th{
                      border:1px solid black !important;              
                  }
              }
          &lt;/style&gt;
      &lt;/head&gt;
  </code></pre>
  
  <p>I actually found a possible solution on another question asked on Stackoverflow:
  <a href="https://webmasters.stackexchange.com/questions/2578/how-to-prevent-table-borders-from-disappearing-while-printing">https://webmasters.stackexchange.com/questions/2578/how-to-prevent-table-borders-from-disappearing-while-printing</a></p>
  
  <p>However, the top border on the headers is lost on the second and following pages.  The spacing is also a bit odd and I still have to add padding to the cells.</p>
  
  <p>Is there an approach that will handle printing the table with the css applied that will work across IE, Chrome, and Firefox?</p>