IE 6表行背景颜色?

时间:2011-02-13 23:33:28

标签: html css internet-explorer-6

几乎每个浏览器都支持我的CSS,但IE 6似乎不想给我想要的结果。

http://99.241.156.130/?page=course

该表上有条纹,但由于某些原因,在IE6中,它们在列和行之间出现白色间隙。

任何帮助都会很棒! :)

2 个答案:

答案 0 :(得分:1)

如果您在列和行之间出现间隙的可能性超过了cellpadding和cellspacing的值。将它们都设置为0将消除间隙。

答案 1 :(得分: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>