简体   繁体   English

隐藏表格标题列边框

[英]Hide table header column border

My table header HTML looks like this 我的表格标题HTML看起来像这样

 .tablebluelight { background: #eef2f7; color: #002d62; font-family: 'Open Sans', sans-serif; font-weight: bold; font-size: 12px; border-color: #eef2f7; } 
 <table class="table table-bordered table-responsive"> <thead> <tr class="tablebluelight"> <th></th> <th>Rod Size</th> <th></th> <th>Rod Angle</th> <th>Rod Size</th> <th></th> <th>Rod Angle</th> <th></th> <th></th> <th></th> <th></th> <th></th> <th></th> </tr> </thead> <tbody> </tbody> </table> 

在此处输入图片说明

I want to remove those white border lines between each column. 我想删除每列之间的那些白色边框线。 How can I achieve this? 我该如何实现?

Try adding border-spacing: 0; 尝试添加border-spacing: 0; to the CSS for the table. 到表格的CSS。

try the following: 尝试以下方法:

table {
   border: collapse;
}

th {
  border: none;
}

td {
  border: //What ever you want
}

Add border-spacing: 0px; 添加border-spacing: 0px; to Table element. 表元素。 See this. 看到这个。

 .table{ border-spacing: 0px; } .tablebluelight { background: #eef2f7; color: #002d62; font-family: 'Open Sans', sans-serif; font-weight: bold; font-size: 12px; border-color: #eef2f7; } 
 <table class="table table-bordered table-responsive"> <thead> <tr class="tablebluelight"> <th></th> <th>Rod Size</th> <th></th> <th>Rod Angle</th> <th>Rod Size</th> <th></th> <th>Rod Angle</th> <th></th> <th></th> <th></th> <th></th> <th></th> <th></th> </tr> </thead> <tbody> </tbody> </table> 

usually i would use these ways to make that happen~~ 通常我会使用这些方式来实现这一目标~~

1. set "cellspacing" as a attribute of that table. 1.将“ cellspacing”设置为该表的属性。

<table cellspacing="0"></table>

2.set css attribute collapse 2.set CSS属性折叠

.table{border-collapse:collapse;}

as a reminder...dont set border to "tr"...it works awfully...coz it would be covered with border of "td"~~~ 提醒一下...不要将边框设置为“ tr” ...效果非常好...因为它将被“ td”边框覆盖~~~

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM