Table border:0 不工作

Table border:0 not working

我这辈子都无法摆脱 table 边界。我在 style.css and custom.css

中都尝试了以下代码
article table {width: 100%; margin-bottom: 20px; border: none; border-collapse: collapse;}
article table td, article table th {padding: 5px; border: none; border-collapse: collapse;}

我也试过 border: 0px 我试过在 table 前面省略 "article" - 仍然没有效果。

你可以看到它看起来有多愚蠢here

如果你说的是所有 table 单元格周围的 1px 灰色边框,它似乎来自你的 style.css 文件中的这个定义:

article table td,article table th{padding:5px;border:1px solid #ddd;}

您在两个文件中对 article table td, article table th 的定义相同 - 一个有边框,第二个没有边框。可能您在 style.css 之前加载 custom.css。在 style.css 之后加载 custom.css 以覆盖样式并删除边框。

我看到了边界而其他人没有,这一事实让我怀疑存在缓存问题。我注意到该网站似乎正在使用 WordPress。您是否打开并启用了任何缓存插件?如果您对 style.css 进行了更改,它可能会从缓存中提供以前的版本。尝试使用您正在使用的任何插件清除缓存,然后刷新页面。