Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/css/37.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Html 打印:删除表边框_Html_Css_Printing - Fatal编程技术网

Html 打印:删除表边框

Html 打印:删除表边框,html,css,printing,Html,Css,Printing,我的打印有问题。我看到了不应该出现的表格边框 这是整页 <!DOCTYPE html> <html lang="en"> <head> <?php $this->load->view('templates/head_inc'); ?> <style type="text/css"> @media print { body {

我的打印有问题。我看到了不应该出现的表格边框

这是整页

<!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>

@媒体印刷品{
身体{
宽度:100%;
身高:100%;
显示:块;
字体系列:“Calibri”;
保证金:0;
}
/*@page{
尺寸:22.59厘米13.97厘米;
} */   
table.footer_表{边框:无!重要;缩放:1}
.标志{
宽度:35%;
}
}
">               
患者ID
详情
会话ID
#                        
服务
数量
健康
折扣
全部的
小计
总额
计费状态
送达人:
| 
__________________________________________
__________________________________________
成员打印姓名上方的签名
授权签字人/与成员和联系人的关系#
但是,我还是没有运气

顺便说一句,我已经将Bootsrap.css包含在头部。
浏览器是谷歌Chrome脚本

function printDiv() {
    var divToPrint = document.getElementById('table');
    var htmlToPrint = '' +
        '<style type="text/css">' +
        'table th, table td {' +
        'border:none;' +
        'padding;0.5em;' +
        '}' +
        '</style>';
    htmlToPrint += divToPrint.outerHTML;
    newWin = window.open("");
    newWin.document.write(htmlToPrint);
    newWin.print();
    newWin.close();
}
函数printDiv(){
var divToPrint=document.getElementById('table');
var htmlToPrint=''+
'' +
'表th,表td{'+
'边界:无;'+
'填充;0.5em;'+
'}' +
'';
htmlToPrint+=divToPrint.outerHTML;
newWin=window.open(“”);
newWin.document.write(htmlToPrint);
newWin.print();
newWin.close();
}

像这样解决了

增加


你有提琴或样本吗?你的HTML是什么?是
.footer\u table
一个表还是一个DIV?这完全不相关…问题是关于打印CSS的,你已经给出了一个JavaScript解决方案。@PraveenKumar这个问题在打印页面时询问删除边框,这样我的答案就正确了。
table .footer_table tr td { border: none !important; zoom: 1 }