2013-10-12 111 views
0

我正在創建一個表格。我想刪除表格邊框線,我該怎麼辦?如何去除表格邊框線?

這裏是我的代碼:

<div id="table"> 
    <table class="table table-bordered"> 
    <thead> 
     <tr> 
      <th style="text-align:left; width:120px;">Item</th> 
      <th style="text-align:left; width:200px;">Description</th> 
      <th style="width:100px;">Unit Cost</th> 
      <th style="text-align:right; width:60px;">Qty</th> 
      <th style="text-align:left; width:100px;">Tax</th> 
      <th style="text-align:left; width:100px;">Tax</th> 
      <th style="text-align:left; width:100px;">Line Total</th> 

     </tr> 
    </thead> 
    <tbody>   
    <tr>   
    <td colspan=7 width=800> 
    <div id="dataRows"> 
<div class="fieldRow" id="template"> 
    <select class="items" name="items" style="width:127px; float:left;" id="items"> <option value="1" selected="selected" disabled="disabled"></option></select> 
    <textarea name="description" id="description" class="description" style="float:left; display: block; height: 30px; width:211px; border-radius:0px; margin: -1px 0px 0;"></textarea> 
    <input type="text" name="unitprice" id="unitprice" class="unitprice" style="float:left; display: block; height: 30px; width:106px; border-radius:0px; margin: -1px 0px 0;"> 
    <input type="text" name="quantity" id="quantity" class="quantity" style="float:left; display: block; height: 30px; width:64px; border-radius:0px; margin: -1px 0px 0;"> 
    <select name="firsttax" id="firsttax" class="firsttax" style=" float:left; display: block; height: 31px; width:107px; border-radius:0px; margin: -2px 0px 0;"><option value="1" selected="selected" ></option></select> 
    <select name="secondtax" id="secondtax" class="secondtax" style="float:left; display: block; height: 31px; width:104px; border-radius:0px; margin: -2px 0px 0;"><option value="1" selected="selected"></option></select> 
    <input type="text" name="linetotal" id="linetotal" class="linetotal" placeholder="0.00" readonly style="float:left; display: block; height: 31px; width:104px; border-radius:0px; background-color: #F0F0F0; text-align:right; margin: -2px 0px 0;"> 
    <input type="button" class="button remove" id="btnDel" value="Remove Row" style="float:right; margin:0 -110px; color: #ffffff; background-color: #d9534f; border-color: #d43f3a; padding: 3px 10px; margin-bottom: 0; font-size: 14px; font-weight: normal; line-height: 1.428571429; text-align: center; white-space: nowrap; vertical-align: middle; cursor: pointer; border:1px solid transparent; border-radius: 4px; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; -o-user-select: none; user-select: none;" /> 
</div> 
</div> 
    </td> 
    </tr> 
    <input type="hidden" id="itemscounter" name="itemscounter" value=""/> 
    <tr>    
    <td colspan=7 rowspan=2 width=800 style="border:0px solid white;"> 
    <div style="border:1px solid #DDDDDD; width:317px; height:50px; margin:0 -1px; float:right;"> 
    <label class="required" id="invoicetotal" for="Invoicetotal" style="padding-top:3px;">Invoice Total(USD)</label> 
    <span style=" font-weight:bold; margin:4px -204px 0; float:right;">$</span> 
    <input type="text" class="required" id="invoicetotalamount" name="invoicetotalamount" placeholder="0.00" readonly style=" color:#526273; font-weight:bold; text-align:left; border: 0px solid #000000;"/><br> 
    <label class="required" id="paidtodate" for="paidtodate" style="margin-top: -6px;">Paid to date</label> 
    <input type="text" class="required" id="paidtodateamount" name="paidtodateamount" placeholder="0.00" style=" color:#526273; font-weight:bold; text-align:right; border: 0px solid #000000;"/>  
    </div> 
    <div class="clear"></div> 
    <div style="border:1px solid #DDDDDD; width:317px; height:33px; margin:50px -316px 0; float:right;"> 
    <label class="required" id="balance" for="balance" style="margin-top:0px;">Balance(USD)</label> 
    <span style=" font-weight:bold; margin:7px 45px 0; float:left;">$</span>  
    <input type="text" class="required" id="balanceamount" name="balanceamount" placeholder="0.00" readonly style=" color:#526273; font-weight:bold; text-align:left; border: 0px solid #000000;"/> 
    </div> 
    </td>  
    </tr> 
    </tbody> 
    </table> 
    </div> 

,這裏是我的CSS:

#table{ 
float: left; 
height: 200px; 
margin: -291px 19px 0; 
width: 825px; 
} 

這裏是截圖:

enter image description here

+0

您應該嘗試使用css文件,而不是使用html標籤放置樣式。 – alditis

+0

爲'.table-bordered'類設置的CSS屬性是什麼? – Harry

回答

4
<table border="0" style="width:825px;"> </table> 

看跌邊界值0或申報表格邊框像上述這些我提到張貼烏爾完整的CSS代碼..

4

使用CSS

它會是

table, th, td 
{ 
    border: 0; 
} 
table 
{ 
    border-collapse:collapse; 
} 
0

編輯您的課程並添加/更改邊界爲零或嘗試更改爲表中的邊框標記。在CSS

0

試試這個簡單的CSS

table.myTable { border:none; } 
3

嘗試使用此代碼:

<table border="0" style="width:825px;border:0px;"> </table>