2011-02-13 69 views
0

我的CSS几乎在每个浏览器都支持,但IE 6似乎并不想给我想要的结果。IE 6表行背景颜色?

http://99.241.156.130/?page=course

表有条纹他们,但出于某种原因在IE6中,他们出现在列和行之间有白色间隙。

任何帮助将是伟大的! :)

+5

与其试图让它在IE6中看起来完全一样,请接受该网站正常工作,看起来适当并继续前进。 IE6比它的价值更麻烦(特别是在Google很快停止它的情况下),并且你的网站(幸好)不必在每个浏览器中都看起来相同。/soapbox – Dominic 2011-02-13 23:35:46

回答

0

在这个例子中没有css,但你可以通过额外的风格标签代码来轻松完成。它是多浏览器便携式。

<div align="center"><table id="myBoostTable" width="760" height="96" cellpadding="5" border="1" cellspacing="0" style="border-color:#000000;font-size:11px; border-collapse:collapse"><tr id="header"> <th align = "center" style="font-size:14px;font-family:Times New Roman;font-weight:700;font-style:normal;border-top-color:#000000;border-bottom-color:#000000;border-top: 1px solid #000000;border-bottom: 1px solid #000000;border-left-color:#000000;border-left: 1px solid #000000;border-right-color:#808080;border-right: 1px solid #808080 " width="380"height="24" bgcolor="#EDEDF1"><font color = "#000000">This is my title col 1</font></th><th align = "center" style="font-size:14px;font-family:Times New Roman;font-weight:700;font-style:normal;border-top-color:#000000;border-bottom-color:#000000;border-top: 1px solid #000000;border-bottom: 1px solid #000000;border-left-color:#808080;border-left: 1px solid #808080;border-right-color:#000000;border-right: 1px solid #000000 " width="380"height="24" bgcolor="#EDEDF1"><font color = "#000000">This is my title col 2</font></th></tr><tr > <td align = "left" style="font-size:12px;font-family:Times New Roman;font-weight:400;font-style:normal;border-top-color:#000000;border-top: 1px solid #000000;border-bottom-color:#D3D3D3;border-bottom: 1px solid #D3D3D3;border-left-color:#000000;border-left: 1px solid #000000;border-right-color:#808080;border-right: 1px solid #808080 " width="380" height="24" bgcolor="#FFFFFF"><font color = "#000000">content 1-1</font></td><td align = "left" style="font-size:12px;font-family:Times New Roman;font-weight:400;font-style:normal;border-top-color:#000000;border-top: 1px solid #000000;border-bottom-color:#D3D3D3;border-bottom: 1px solid #D3D3D3;border-left-color:#808080;border-left: 1px solid #808080;border-right-color:#000000;border-right: 1px solid #000000 " width="380" height="24" bgcolor="#F3EFFF"><font color = "#000000">content 1-2</font></td></tr><tr > <td align = "left" style="font-size:12px;font-family:Times New Roman;font-weight:400;font-style:normal;border-top-color:#D3D3D3;border-top: 1px solid #D3D3D3;border-bottom-color:#D3D3D3;border-bottom: 1px solid #D3D3D3;border-left-color:#000000;border-left: 1px solid #000000;border-right-color:#808080;border-right: 1px solid #808080 " width="380" height="24" bgcolor="#FAFAFF"><font color = "#000000">content 2-1</font></td><td align = "left" style="font-size:12px;font-family:Times New Roman;font-weight:400;font-style:normal;border-top-color:#D3D3D3;border-top: 1px solid #D3D3D3;border-bottom-color:#D3D3D3;border-bottom: 1px solid #D3D3D3;border-left-color:#808080;border-left: 1px solid #808080;border-right-color:#000000;border-right: 1px solid #000000 " width="380" height="24" bgcolor="#EEEAFF"><font color = "#000000">content 2-2</font></td></tr><tr > <td align = "left" style="font-size:12px;font-family:Times New Roman;font-weight:400;font-style:normal;border-top-color:#D3D3D3;border-top: 1px solid #D3D3D3;border-bottom-color:#000000;border-bottom: 1px solid #000000;border-left-color:#000000;border-left: 1px solid #000000;border-right-color:#808080;border-right: 1px solid #808080 " width="380" height="24" bgcolor="#FFFFFF"><font color = "#000000">content 3-1</font></td><td align = "left" style="font-size:12px;font-family:Times New Roman;font-weight:400;font-style:normal;border-top-color:#D3D3D3;border-top: 1px solid #D3D3D3;border-bottom-color:#000000;border-bottom: 1px solid #000000;border-left-color:#808080;border-left: 1px solid #808080;border-right-color:#000000;border-right: 1px solid #000000 " width="380" height="24" bgcolor="#F3EFFF"><font color = "#000000">content 3-2</font></td></tr></table></div> 
1

如果您在列和行之间获得空白的可能性比在cellpadding和cellspacing中的值更大。将它们都设置为0将消除间隙。