none
請問IE8 我要如何設定表格格線顏色 RRS feed

  • 問題

  • 各位前輩好
    小弟我的報表頁面 原本在IE7 顏色都正常
    但到了IE8
    變成TABLE外部格線顏色很淡 內部格線顏色較深
    而且好像也無法設定格線的顏色
    小弟的需求只是希望表格內的格線顏色都一致為黑色

    ///////////////////////////////////////////////////////////
    以下是小弟輸出的前端代碼
    可直接全部剪下貼到筆記本用IE開啟 
    希望各位前輩能指點一下該如何修改

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
    <HTML>
     <HEAD>
      <title>SDCU301R10</title>
      <meta content="Microsoft Visual Studio 7.0" name="GENERATOR">
      <meta content="C#" name="CODE_LANGUAGE">
      <meta content="JavaScript" name="vs_defaultClientScript">
      <meta content="http://schemas.microsoft.com/intellisense/ie5" name="vs_targetSchema">
      <LINK media="all" href="XSLT/SDReport.css" rel="stylesheet">
      <style media="screen">.printhidden { DISPLAY: block }
      </style>
      <STYLE>SPAN { FONT-SIZE: 10pt }
     INPUT { FONT-SIZE: 10px; FONT-FAMILY: Arial;}
     SELECT { FONT-SIZE: 10px; FONT-FAMILY: Arial;}
      </STYLE>
      <script language="javascript">
      <!--
      function window.onload()
       {
       factory.printing.header = "&b第 &p 頁,共 &P 頁"; //"&b"+"testing..." //頁首
       factory.printing.footer = ""; //"&b&p / &P" //頁尾
       factory.printing.leftMargin = 0.15748031496062992125984251968504; //左邊界
       factory.printing.topMargin = 0.15748031496062992125984251968504;  //上邊界
       factory.printing.rightMargin = 0.15748031496062992125984251968504; //右邊界
       factory.printing.bottomMargin = 0.15748031496062992125984251968504;  //下邊界
       factory.printing.portrait=false; //true:直印 false:橫印
       
      }
      
      function aa() {  
      factory.printing.Print(false);//直接列印
      //factory.printing.Preview();//預覽列印
      }
      -->


      function test()
      {
      var obj =document.getElementByTagname('div');
      var atr;
      for(var i in obj)
      {
       atr+=i.name;
      }
       alert(i);
      }

      </script>
     </HEAD>
     <body MS_POSITIONING="GridLayout" >
      <OBJECT id="factory" style="DISPLAY: none" codeBase="../ScriptX.cab#Version=6,1,429,14" classid="clsid:1663ed61-23eb-11d2-b92f-008048fdd814" VIEWASTEXT>
      </OBJECT>
      
       <input name="Button3" type="button" id="Button3" class="printhidden" onclick="javascript:aa();" value="列印" />
       <input name="Button1" type="button" id="Button1" class="printhidden" onclick="window.history.back();" value="回上頁" />
       
       <div name="Page1" id="Page1" class="Hpage" >
     
        <TABLE class="HpageHead" style="border:0;border-color:white" >
         <TR>
          <TD align="center" colSpan="3">
           <span id="lblCOMP" style="font-size:10pt;font-weight:bold;">XX行</span>
           <span id="Label5" style="font-size:10pt;font-weight:bold;">股份有限公司</span></TD>
         </TR>
         <TR>
          <TD align="left" width="430">
           <P>
            <span id="Label2" style="font-size:10pt;">部門:</span>
            <span id="lblDPT_SHORT_NAME" style="font-size:10pt;width:70px;">板橋  </span><FONT face="新細明體">-</FONT>
            <span id="lblDPT" style="font-size:10pt;width:47px;">0032</span>
            <span id="Label3" style="font-size:10pt;">組別:</span>
            <span id="lblTEAM_NAME" style="font-size:10pt;">營業A組</span><BR>
            <span id="Label4" style="font-size:10pt;">同仁:</span>
            <span id="lblEMP_NAME" style="font-size:10pt;width:70px;">吳XX      </span><FONT face="新細明體">-
             <span id="lblEMPNO" style="font-size:10pt;width:47px;">00028679</span></FONT><FONT face="新細明體"></FONT></P>
          </TD>
          <TD align="center">
           <span id="Label27" style="font-size:10pt;font-weight:bold;">有 望 顧 客 彙 總 表</span></TD>
          <TD align="right" width="430"><FONT face="新細明體"><BR>
            <span id="Label1" style="font-size:10pt;">列印日期:</span>
            <span id="lblDT" style="font-size:10pt;">2010/01/20</span></FONT></TD>
         </TR>
        </TABLE>
        <DIV  style="border-color:black"  border=20>
         <table cellspacing="0" rules="all" border="1" id="dgrdSO302" style="font-size:9pt;width:100%;border-collapse:collapse;">
      <tr>
       <td>序</td><td>等級</td><td>顧客名稱/狀態<BR>地址/大樓</td><td>連絡人</td><td>電話<BR>傳真電話</td><td>推動<BR>機型</td><td>現有<BR>機型</td><td>數量</td><td>報價</td><td>建議<BR>書</td><td>試機</td><td>最近<BR>表演日</td><td>最近<BR>拜訪日</td><td>競爭<BR>廠商</td><td>競爭<BR>廠牌</td><td>競爭<BR>機型</td><td>預定<BR>成交日</td><td>預估<BR>金額</td>
      </tr><tr style="height:5mm;">
       <td>1</td><td style="width:30px;">A</td><td>
             <span id="dgrdSO302__ctl2_Label6">台灣XXXXX/S</span><BR>
             <span id="dgrdSO302__ctl2_Label7">22044台北縣XXXXXXXXXXX</span>
             <span id="dgrdSO302__ctl2_Label8">/</span>
            </td><td>安ZZ</td><td>
             <span>02 -29547919【432】</span><br>
             <span>02-29562716</span>
            </td><td>m-sh-arm258       </td><td>&nbsp;</td><td align="right" valign="middle" style="width:30px;">4</td><td align="right" valign="middle">300,000</td><td align="center" valign="middle" style="width:40px;"></td><td align="center" valign="middle" style="width:30px;"></td><td>&nbsp;</td><td>2010/01/19</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>2010/03/25</td><td align="right" valign="middle">300,000</td>
      </tr><tr style="height:5mm;">
       <td>&nbsp;</td><td style="width:30px;">&nbsp;</td><td>
             <span id="dgrdSO302__ctl3_Label6"></span><BR>
             <span id="dgrdSO302__ctl3_Label7"></span>
             <span id="dgrdSO302__ctl3_Label8"></span>
            </td><td>&nbsp;</td><td>
             <span></span><br>
             <span></span>
            </td><td>&nbsp;</td><td>&nbsp;</td><td align="right" valign="middle" style="width:30px;">&nbsp;</td><td align="right" valign="middle">&nbsp;</td><td align="center" valign="middle" style="width:40px;"></td><td align="center" valign="middle" style="width:30px;"></td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>小計:</td><td align="right" valign="middle">300,000</td>
      </tr><tr style="height:5mm;">
       <td>2</td><td style="width:30px;">A</td><td>
             <span id="dgrdSO302__ctl4_Label6">台灣XXXXXXXXX/S</span><BR>
             <span id="dgrdSO302__ctl4_Label7">22044台北縣XXXXXXXXXXXX</span>
             <span id="dgrdSO302__ctl4_Label8">/</span>
            </td><td>安ZZ</td><td>
             <span>02 -29547919【432】</span><br>
             <span>02-29562716</span>
            </td><td>m-sh-fo5900       </td><td>&nbsp;</td><td align="right" valign="middle" style="width:30px;">3</td><td align="right" valign="middle">48,000</td><td align="center" valign="middle" style="width:40px;"></td><td align="center" valign="middle" style="width:30px;"></td><td>&nbsp;</td><td>2010/01/19</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>2010/03/25</td><td align="right" valign="middle">48,000</td>
      </tr><tr style="height:5mm;">
       <td>&nbsp;</td><td style="width:30px;">&nbsp;</td><td>
             <span id="dgrdSO302__ctl5_Label6"></span><BR>
             <span id="dgrdSO302__ctl5_Label7"></span>
             <span id="dgrdSO302__ctl5_Label8"></span>
            </td><td>&nbsp;</td><td>
             <span></span><br>
             <span></span>
            </td><td>&nbsp;</td><td>&nbsp;</td><td align="right" valign="middle" style="width:30px;">&nbsp;</td><td align="right" valign="middle">&nbsp;</td><td align="center" valign="middle" style="width:40px;"></td><td align="center" valign="middle" style="width:30px;"></td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>小計:</td><td align="right" valign="middle">348,000</td>
      </tr><tr style="height:5mm;">
       <td>3</td><td style="width:30px;">A</td><td>
             <span id="dgrdSO302__ctl6_Label6">中華XXXX/S</span><BR>
             <span id="dgrdSO302__ctl6_Label7">22045台北縣XXXXXXXX</span>
             <span id="dgrdSO302__ctl6_Label8">/</span>
            </td><td>胡XX</td><td>
             <span> 02-89415715</span><br>
             <span>02-29207744</span>
            </td><td>m-sh-mx2300n      </td><td>351u              </td><td align="right" valign="middle" style="width:30px;">2</td><td align="right" valign="middle">12,000</td><td align="center" valign="middle" style="width:40px;"></td><td align="center" valign="middle" style="width:30px;"></td><td>2008/08/19</td><td>2010/01/14</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>2010/03/30</td><td align="right" valign="middle">360,000</td>
      </tr><tr style="height:5mm;">
       <td>&nbsp;</td><td style="width:30px;">&nbsp;</td><td>
             <span id="dgrdSO302__ctl7_Label6"></span><BR>
             <span id="dgrdSO302__ctl7_Label7"></span>
             <span id="dgrdSO302__ctl7_Label8"></span>
            </td><td>&nbsp;</td><td>
             <span></span><br>
             <span></span>
            </td><td>&nbsp;</td><td>&nbsp;</td><td align="right" valign="middle" style="width:30px;">&nbsp;</td><td align="right" valign="middle">&nbsp;</td><td align="center" valign="middle" style="width:40px;"></td><td align="center" valign="middle" style="width:30px;"></td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>小計:</td><td align="right" valign="middle">708,000</td>
      </tr><tr style="height:5mm;">
       <td>4</td><td style="width:30px;">A</td><td>
             <span id="dgrdSO302__ctl8_Label6">XXX大學(文書組)/N</span><BR>
             <span id="dgrdSO302__ctl8_Label7">220台北縣XXXXXXXXXXXXXX</span>
             <span id="dgrdSO302__ctl8_Label8">/</span>
            </td><td>陳QQ</td><td>
             <span> 02-22722181【1241】</span><br>
             <span>無傳真電話紀錄</span>
            </td><td>m-sh-mx2300n      </td><td>&nbsp;</td><td align="right" valign="middle" style="width:30px;">1</td><td align="right" valign="middle">10,500</td><td align="center" valign="middle" style="width:40px;"></td><td align="center" valign="middle" style="width:30px;"></td><td>&nbsp;</td><td>2010/01/19</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>2010/03/10</td><td align="right" valign="middle">252,000</td>
      </tr><tr style="height:5mm;">
       <td>&nbsp;</td><td style="width:30px;">&nbsp;</td><td>
             <span id="dgrdSO302__ctl9_Label6"></span><BR>
             <span id="dgrdSO302__ctl9_Label7"></span>
             <span id="dgrdSO302__ctl9_Label8"></span>
            </td><td>&nbsp;</td><td>
             <span></span><br>
             <span></span>
            </td><td>&nbsp;</td><td>&nbsp;</td><td align="right" valign="middle" style="width:30px;">&nbsp;</td><td align="right" valign="middle">&nbsp;</td><td align="center" valign="middle" style="width:40px;"></td><td align="center" valign="middle" style="width:30px;"></td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>小計:</td><td align="right" valign="middle">960,000</td>
      </tr><tr style="height:5mm;">
       <td>5</td><td style="width:30px;">A</td><td>
             <span id="dgrdSO302__ctl10_Label6">XXXX大學(美術學院)/S</span><BR>
             <span id="dgrdSO302__ctl10_Label7">220台北縣XXXXXXXX</span>
             <span id="dgrdSO302__ctl10_Label8">/</span>
            </td><td>陳QQ</td><td>
             <span> 02-22722181【2001】</span><br>
             <span>02-29695992</span>
            </td><td>M-SH-MX2300N      </td><td>&nbsp;</td><td align="right" valign="middle" style="width:30px;">1</td><td align="right" valign="middle">200,000</td><td align="center" valign="middle" style="width:40px;"></td><td align="center" valign="middle" style="width:30px;"></td><td>&nbsp;</td><td>2010/01/19</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>2010/03/22</td><td align="right" valign="middle">200,000</td>
      </tr><tr style="height:5mm;">
       <td>&nbsp;</td><td style="width:30px;">&nbsp;</td><td>
             <span id="dgrdSO302__ctl11_Label6"></span><BR>
             <span id="dgrdSO302__ctl11_Label7"></span>
             <span id="dgrdSO302__ctl11_Label8"></span>
            </td><td>&nbsp;</td><td>
             <span></span><br>
             <span></span>
            </td><td>&nbsp;</td><td>&nbsp;</td><td align="right" valign="middle" style="width:30px;">&nbsp;</td><td align="right" valign="middle">&nbsp;</td><td align="center" valign="middle" style="width:40px;"></td><td align="center" valign="middle" style="width:30px;"></td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>小計:</td><td align="right" valign="middle">1,160,000</td>
      </tr><tr style="height:5mm;">
       <td>&nbsp;</td><td style="width:30px;">&nbsp;</td><td>
             <span id="dgrdSO302__ctl12_Label6"></span><BR>
             <span id="dgrdSO302__ctl12_Label7"></span>
             <span id="dgrdSO302__ctl12_Label8"></span>
            </td><td>&nbsp;</td><td>
             <span></span><br>
             <span></span>
            </td><td>&nbsp;</td><td>&nbsp;</td><td align="right" valign="middle" style="width:30px;">&nbsp;</td><td align="right" valign="middle">&nbsp;</td><td align="center" valign="middle" style="width:40px;"></td><td align="center" valign="middle" style="width:30px;"></td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td align="right" valign="middle">&nbsp;</td>
      </tr><tr style="height:5mm;">
       <td>&nbsp;</td><td style="width:30px;">&nbsp;</td><td>
             <span id="dgrdSO302__ctl13_Label6"></span><BR>
             <span id="dgrdSO302__ctl13_Label7"></span>
             <span id="dgrdSO302__ctl13_Label8"></span>
            </td><td>&nbsp;</td><td>
             <span></span><br>
             <span></span>
            </td><td>&nbsp;</td><td>&nbsp;</td><td align="right" valign="middle" style="width:30px;">&nbsp;</td><td align="right" valign="middle">&nbsp;</td><td align="center" valign="middle" style="width:40px;"></td><td align="center" valign="middle" style="width:30px;"></td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td align="right" valign="middle">&nbsp;</td>
      </tr><tr style="height:5mm;">
       <td>&nbsp;</td><td style="width:30px;">&nbsp;</td><td>
             <span id="dgrdSO302__ctl14_Label6"></span><BR>
             <span id="dgrdSO302__ctl14_Label7"></span>
             <span id="dgrdSO302__ctl14_Label8"></span>
            </td><td>&nbsp;</td><td>
             <span></span><br>
             <span></span>
            </td><td>&nbsp;</td><td>&nbsp;</td><td align="right" valign="middle" style="width:30px;">&nbsp;</td><td align="right" valign="middle">&nbsp;</td><td align="center" valign="middle" style="width:40px;"></td><td align="center" valign="middle" style="width:30px;"></td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td align="right" valign="middle">&nbsp;</td>
      </tr><tr style="height:5mm;">
       <td>&nbsp;</td><td style="width:30px;">&nbsp;</td><td>
             <span id="dgrdSO302__ctl15_Label6"></span><BR>
             <span id="dgrdSO302__ctl15_Label7"></span>
             <span id="dgrdSO302__ctl15_Label8"></span>
            </td><td>&nbsp;</td><td>
             <span></span><br>
             <span></span>
            </td><td>&nbsp;</td><td>&nbsp;</td><td align="right" valign="middle" style="width:30px;">&nbsp;</td><td align="right" valign="middle">&nbsp;</td><td align="center" valign="middle" style="width:40px;"></td><td align="center" valign="middle" style="width:30px;"></td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td align="right" valign="middle">&nbsp;</td>
      </tr><tr style="height:5mm;">
       <td>&nbsp;</td><td style="width:30px;">&nbsp;</td><td>
             <span id="dgrdSO302__ctl16_Label6"></span><BR>
             <span id="dgrdSO302__ctl16_Label7"></span>
             <span id="dgrdSO302__ctl16_Label8"></span>
            </td><td>&nbsp;</td><td>
             <span></span><br>
             <span></span>
            </td><td>&nbsp;</td><td>&nbsp;</td><td align="right" valign="middle" style="width:30px;">&nbsp;</td><td align="right" valign="middle">&nbsp;</td><td align="center" valign="middle" style="width:40px;"></td><td align="center" valign="middle" style="width:30px;"></td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td align="right" valign="middle">&nbsp;</td>
      </tr><tr style="height:5mm;">
       <td>&nbsp;</td><td style="width:30px;">&nbsp;</td><td>
             <span id="dgrdSO302__ctl17_Label6"></span><BR>
             <span id="dgrdSO302__ctl17_Label7"></span>
             <span id="dgrdSO302__ctl17_Label8"></span>
            </td><td>&nbsp;</td><td>
             <span></span><br>
             <span></span>
            </td><td>&nbsp;</td><td>&nbsp;</td><td align="right" valign="middle" style="width:30px;">&nbsp;</td><td align="right" valign="middle">&nbsp;</td><td align="center" valign="middle" style="width:40px;"></td><td align="center" valign="middle" style="width:30px;"></td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td align="right" valign="middle">&nbsp;</td>
      </tr><tr style="height:5mm;">
       <td>&nbsp;</td><td style="width:30px;">&nbsp;</td><td>
             <span id="dgrdSO302__ctl18_Label6"></span><BR>
             <span id="dgrdSO302__ctl18_Label7"></span>
             <span id="dgrdSO302__ctl18_Label8"></span>
            </td><td>&nbsp;</td><td>
             <span></span><br>
             <span></span>
            </td><td>&nbsp;</td><td>&nbsp;</td><td align="right" valign="middle" style="width:30px;">&nbsp;</td><td align="right" valign="middle">&nbsp;</td><td align="center" valign="middle" style="width:40px;"></td><td align="center" valign="middle" style="width:30px;"></td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td align="right" valign="middle">&nbsp;</td>
      </tr>
     </table></DIV>
        <table id="Table1" class="HpageFoot" style="HEIGHT: 50px">
      <tr>
       <TD align="left" width="34%">總部:</TD>
       <TD align="left" width="33%">主管:</TD>
       <TD align="left" width="33%">主任:</TD>
      </tr>
     </table>
     
       
    </div><div id="Panel1">

    </div><script language=JavaScript>var vLastPage=1;</script>
     </body>
    </HTML>

    2010年1月29日 上午 07:41

解答

  • 這裡不是網頁開發討論區。

    你可以調整你 CSS 內的值。
    論壇是網友平等互助 保證解答請至 微軟技術支援服務
    提問時,錯誤情境描述與錯誤訊息很重要,情境描述包含你做了什麼,預期的結果與實際發生的結果。一個最爛的問法範例:「我的電腦電腦怎麼不能開機?」誰知道你家是不是沒電還是你根本找不到電源鈕。
    • 已標示為解答 Vincent Lin 2010年2月2日 上午 04:01
    2010年1月31日 上午 06:58