HTML表BorderColor在浏览器之间有很大差异

时间:2012-09-20 10:58:14

标签: html css html-table cross-browser

我有一个令人讨厌的问题,我的表格在浏览器之间似乎完全不同,它们被设置为:

<table width="100%" border="1" cellpadding="4"  cellspacing="0" bordercolor="#eeeeee">

所以左边的那个(Chrome)在#eeeeee上是正确的,但是FF和IE似乎正在弥补它们的进展! 我的CSS中没有任何东西与指定一个表格边界有点关系(我甚至尝试取消链接我的CSS文件并且问题仍然存在)

有什么想法吗?

enter image description here

4 个答案:

答案 0 :(得分:9)

  

@Darkat Studios

     

<table width="100%" border="1" cellpadding="4" cellspacing="0" style="border: 2px solid #eeeeee;"> - 现在确实有一个浅灰色的边框,但是细胞仍然是黑色的轮廓。非常奇怪! -

你应该删除border =“1”

答案 1 :(得分:4)

试试这个CSS

table{
    border-collapse: collapse;
    border: 1px solid #eee;
    width: 100%;
}
table th,
table td
{
    padding: 4px;
}

并将您的HTML更改为简单说明

<table>

答案 2 :(得分:2)

在CSS中给出:

table {border: 2px solid #eeeeee;}

或者至少:

table {border-style: solid;}

现在检查所有浏览器。

答案 3 :(得分:-3)

尝试删除&#39;#&#39; BORDERCOLOR =&#34; EEEEEE&#34;

相关问题