Firefox中缺少表格边框 [英] Missing table borders in Firefox

查看:122
本文介绍了Firefox中缺少表格边框的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个包含数据的表,当我在Firefox中查看它时,某些边框没有显示。请参阅所附的屏幕截图。

I have a table with data and when I view it in Firefox some of the borders are not showing. Please see screenshot attached.

在任何其他浏览器中都不会发生。在Firefox,IE,Safari和Chrome中进行了测试。

This does not happen in any other browsers. Tested in Firefox, IE, Safari and Chrome.

有人知道为什么要修复它吗?

Any idea why and hot to fix it?

I使用样式来格式化表格:

I use styles to format the table:

.myTbl {
  border: 2px solid #cccccc;
  border-collapse: collapse;
}

.myTbl th, .myTbl td {
  white-space: nowrap;
  border-right: 1px solid #cccccc;
  border-bottom: 1px solid #cccccc;
  padding: 2px;
}

.myTbl td {
  text-align: center;
  width: 15%;
}

.myTbl tr:hover td {
  background-color: #ffffcc;
}

.myTbl thead th, .myTbl thead:hover th {
  text-align: center;
  font: normal 10px arial, verdana, sans-serif;
  background-color: #ffffff;
}

HTML:

<table class="myTbl">
<thead>
<tr>
    <th></th>
</tr>
</thead>
<tbody>
<tr>
    <td></td>
</tr>
</tbody>
</table>


推荐答案

对于以下问题似乎已经解决了我的问题问题。我替换为:

For what it's worth the following seem to have solved my issue. I replaced:

border-collapse: collapse;

border-collapse: separate;
border-spacing: 0;

这篇关于Firefox中缺少表格边框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆