Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/css/40.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 - Fatal编程技术网

Html 边界仍然显示,为什么?

Html 边界仍然显示,为什么?,html,css,Html,Css,我在桌子上有个奇怪的问题。。。我在css中将边框设置为0,将边框颜色设置为透明,但是在浏览器中,它仍然在顶部和左侧显示边框,这没有任何意义 该表看起来像 css看起来像: table.transaction-posts, table#gvTransactions { border: 0 none transparent !important; border-radius: 0 0 0 0; } 如您所见,它仍然在顶部、左侧和每行输出黑色边框,即使我已将边框设置为0 在表标记中…添加bo

我在桌子上有个奇怪的问题。。。我在css中将边框设置为0,将边框颜色设置为透明,但是在浏览器中,它仍然在顶部和左侧显示边框,这没有任何意义

该表看起来像

css看起来像:

table.transaction-posts, table#gvTransactions {
  border: 0 none transparent !important;
  border-radius: 0 0 0 0;
}
如您所见,它仍然在顶部、左侧和每行输出黑色边框,即使我已将边框设置为0


在表标记中…添加border=“0”…如果这不起作用,那么检查是否有css覆盖了它,也将代码发布到JSFIDLE中。

表中的HTML属性
rules=“all”
会在所有单元格的所有侧面绘制边框。HTML4.01规范对此有点含糊不清,但浏览器就是这样解释的。因此,如果不需要任何边界,请删除该属性

如果希望有一些边界而不是全部边界,则需要适当地设置它们。例如,如果最上面和最左边的边界是问题(这是对所问问题的一种解释),则设置

table#gvTransactions tr:first-child th, table#gvTransactions tr:first-child td {
  border-top: none;
}
table#gvTransactions th:first-child, table#gvTransactions td:first-child {
  border-left: none;
}

第一条规则删除第一行中任何单元格的上边框。第二个选项删除父元素的第一个子元素单元格的左边框,即第一列中的单元格。

在web浏览器中打开开发者工具(Firefox需要Firebug附加组件),检查表(以及可选的内部元素)并检查哪一个定义了边框。是否设置了
tr
/
td
/
th
?单元格和行有单独的边框。你也需要解决它们。在tr和td上,我设置了一个边界底部:1px solid#ccc,所以不是那样。。。