gpt4 book ai didi

html - 相对定位的表格单元格的边框。 IE显示问题

转载 作者:行者123 更新时间:2023-11-28 18:32:29 25 4
gpt4 key购买 nike

我在为具有相对位置样式的表格单元格设置边框时遇到问题:fiddle example

table {
border-collapse: collapse;
}

td {
border: 1px solid green;
position: relative;
}

在 FF 和 Chrome 中看起来不错: enter image description here

但在 IE 中我看到双倍的单元格边框: enter image description here

只有当 td 相对定位时才会出现双边框。

我知道作为解决方法,可以从表格单元格中删除边框并在表格单元格内放置额外的带边框的 div。但也许有另一种方法可以在 IE 中解决这个问题?

编辑:我设法显示结合了单元格和表格边框样式的边框: http://jsfiddle.net/GaTHZ/4/

最佳答案

这将解决它。在 IE 和 Chrome 中工作。

 table {
border-collapse: collapse;
margin-right:30px;
margin-left:30px;
border-right: 1px solid green;
border-bottom: 1px solid green;
}

td {
border-left: 1px solid green;
border-top: 1px solid green;
width: 200px;
height: 35px;
position: relative;
}​

关于html - 相对定位的表格单元格的边框。 IE显示问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13859437/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com