打印:删除表格边框

时间:2015-08-26 09:08:43

标签: html css css3 printing

我遇到打印问题。我看到桌边框不应该出现。

这是整页

<!DOCTYPE html>
<html lang="en">
  <head>    
    <?php $this->load->view('templates/head_inc');  ?>
    <style type="text/css">
          @media print {
              body {
                  width: 100%;
                  height: 100%;
                  display: block; 
                  font-family: "Calibri";
                  margin: 0 0 0 0;        
              }

             /* @page {
                size: 22.59cm 13.97cm;

              } */   

               table .footer_table { border: none !important; zoom: 1 } 

              .logo {
                width: 35%;
              }

          }

    </style>
  </head>

  <body onLoad="javascript:window.print()">

    <?php foreach ($results as $data):?>
    <div class="container-fluid">
      <div class="row">
        <div class="col-md-10">
          <table class="table table-bordered">
            <tr>
              <td colspan="3"><img class="logo" src="<?php echo base_url('assets/images/logo.png');?>"></td>               
            </tr>
            <tr>
              <td><?=$data->billing_patientname?></td>
              <th>PATIENT ID</th>
              <td><?=$data->billing_patientid?></td>              
            </tr>            
            <tr>
              <th>PARTICULARS</th>            
              <th>SESSION ID</th>
              <td><?=$data->billing_sessionid?></td>
            </tr>  
            <tr>              
              <td rowspan="5">
                  <table class="table table-condensed">
                    <thead>                   
                      <tr>                        
                        <th>#</th>                        
                        <th>SERVICES</th>                
                        <th>AMOUNT</th> 
                        <th>PHILHEALTH</th>
                        <th>DISCOUNT</th>
                        <th>TOTAL</th>                    
                      </tr>
                    </thead>
                    <tbody>                      

                      <?php
                           $this->db->where('billing_id', $data->billing_id);
                           $query = $this->db->get('billing_entry');
                           $x = 1;
                                foreach ($query->result() as $row)
                                {   
                                    echo '<tr>';                                    
                                    echo '<td>' . $x++ . '</td>';
                                    echo '<td>' . $row->billing_servicename . ' (' . $row->billing_serviceid . ')';
                                          if($row->billing_servicename == "MEDICAL SUPPLIES")
                                          { 
                                            echo '<br/>-----------------------------------------------------------------------------<br/>';

                                                $this->db->where('service_id', $row->billing_serviceid);
                                                $query2 = $this->db->get('medical_purchases');
                                                foreach ($query2->result() as $row2)
                                                {
                                                  echo $row2->item_name . ' (' . $row2->item_quantity . ') -- '. $row2->item_price .'<br/>';
                                                }
                                          }
                                    echo '</td>';
                                    echo '<td>'.$row->billing_amount.'</td>';  
                                    echo '<td>'.$row->billing_philhealth.'</td>';  
                                    echo '<td>'.$row->billing_discount.'</td>';  
                                    echo '<td>' . ($row->billing_amount + ($row->billing_philhealth*(-1)) + ($row->billing_discount*(-1))) . '</td>';                                                                
                                    echo '</tr>';
                                } 
                          ?>
                    </tbody>

                  </table>
              </td>
            </tr>
            <tr>
              <th width="20%">SUBTOTAL</th>
              <td><?php
                           $this->db->where('billing_id', $data->billing_id);
                           $this->db->select_sum('billing_amount');
                           $query2 = $this->db->get('billing_entry');
                           $x = 1;
                                foreach ($query2->result() as $subtot)
                                {   
                                    echo '₱'.$subtot->billing_amount;                                   
                                } 
                          ?>
              </td>
            </tr>
            <tr>
              <th width="20%">TOTAL AMOUNT</th>
              <td><?php
                           $this->db->where('billing_id', $data->billing_id);
                           $this->db->select('SUM(billing_amount) + SUM(billing_philhealth*(-1)) + SUM(billing_discount*(-1)) as total', FALSE);
                           $query3 = $this->db->get('billing_entry');
                           $x = 1;
                                foreach ($query3->result() as $tot)
                                {   
                                    echo '₱'.$tot->total;                              
                                } 
                          ?>
              </td>
            </tr>
            <tr>
              <th>BILLING STATUS</th>
              <td><?=$data->billing_status?></td>
            </tr>
            <tr>
              <td colspan="2"></td>
            </tr>
            <tr>
              <td colspan="3">
                  Served by: <strong><?php echo $username;?></strong>                  
                  <span class="pull-right"><?php echo date('Y-m-d H:i:s');?> | <?=$data->billing_id?></span>
              </td>
            </tr>         
            <tr>
              <td colspan="3">
                  <table style="margin-top:50px; margin-left:50px;border:none;" class="footer_table">
                    <tr>
                      <td>__________________________________________</td>
                      <td width="50%" style="padding-left:150px"></td>
                      <td>__________________________________________</td>
                    </tr>
                    <tr>
                      <td style="text-align:center;"><small><em>Signature over Printed Name of the Member</em></small></td>
                      <td></td>
                      <td style="text-align:center;"><small><em>Authorized Signatory/Relation to Member and Contact #</em></small></td>
                    </tr>
                  </table>
              </td>
            </tr>         
          </table>          
        </div>       
      </div>     
    </div>
<?php endforeach; ?>    
    <!-- Bootstrap core JavaScript
    ================================================== -->
    <!-- Placed at the end of the document so the pages load faster -->
    <?php $this->load->view('templates/footer_inc');  ?>

      </body>
</html>

但仍然没有运气。

顺便说一下,我已经将 Bootsrap.css 列入了头部。 浏览器谷歌浏览器

1 个答案:

答案 0 :(得分:1)

<强>解决

table .footer_table tr td { border: none !important; zoom: 1 }