如何删除div的顶部偏移量

时间:2011-03-28 11:53:00

标签: internet-explorer html offset

我有通过JavaScript文件创建的表格,Chrome和FF中的样式一切都很好,但IE8中存在问题。结构如下:

...
<td id="MyTD">

  <style type="text/css">
      #MyTD table div
     {
         **???? offset ????**
     }
<script> This script creates the table below</sctipt>
</td>
...

The script creates the following table:

<table>
  <tbody>
    <tr>
      <td>
        <div></div>
        <span></span>
      </td>
    </tr>
  </tbody>
</table>

当我查看开发工具时,我发现div的顶部偏移量不是0,如果我在Dev Tools中更改它,那么它很好,但我需要在Style标签中更改它,如上所示对脚本文件的任何更改。

请协助

0 个答案:

没有答案
相关问题