border-collapse 关于继承问题

          示例:<table id='table1' style="width: 100%;border-collapse:collapse; border-spacing:0px;">
                        <tr>
                              <td style="width: 50%;"><table  id='table2' >
                                    <tr>
                                          <td><input type='checkbox' /></td><td>测试</td>
                                    </tr>
                              </table></td>
                              <td style="width: 50%;"><table >
                                    <tr>
                                          <td><input type='checkbox' /></td><td>测试</td>
                                    </tr>
                              </table></td>

                        </tr>
                  </table>
            问题描述:如上代码在IE8.0里面不会有任何问题,但是<IE8.0的浏览器中会出现 id为table2里面两个TD之间会出现间隔。
            解决办法:把border-collapse:collapse; border-spacing:0px; 加在table2里面。
            原因:border-collapse在IE8.0里面被子table 继承了,但是在<IE8.0的浏览器中没有被继承。这也许是IE的Bug 之一。希望各位批评指教。

你可能感兴趣的:(border)