简体   繁体   English

IE8 / IE9中的表出现问题

[英]Problem with table in IE8/IE9

So our site was designed without a doctype, and I'm trying to update it so that it's not forcing IE into quirks mode. 因此,我们的网站设计为没有doctype,因此我正在尝试对其进行更新,以免强制IE进入怪癖模式。
The problem is, there are a few tables that were using rounded corner images since the devs didn't understand how to use a div-based design. 问题是,由于开发人员不了解如何使用基于div的设计,因此一些表正在使用圆角图像。 This looks normal in quirks mode and even IE7 mode, but when I use IE8 or IE9 standards mode, some of the rows in the table end up being taller than they should (namely the rows that contain the rounded corner images) and no amount of forced height seems to work. 这在怪癖模式甚至IE7模式下看起来都是正常的,但是当我使用IE8或IE9标准模式时,表中的某些行最终比它们应该的高(即,包含圆角图像的行),并且没有强迫身高似乎起作用。 Is there some basic table display method I'm missing? 我缺少一些基本的表格显示方法吗? This looks fine in all browsers EXCEPT IE8 and IE9, which to me is baffling. 在除IE8和IE9之外的所有浏览器中,这看起来都不错,这在我看来是莫名其妙的。 I've copied the code (with fully qualified image links) to jsbin, and you can view it here: 我已将代码(带有完全限定的图像链接)复制到jsbin,您可以在此处查看它:
http://jsbin.com/ofedet/ http://jsbin.com/ofedet/

I know the best method is to go ahead and replace these with divs or some other semantic element with border-radius, but for the time being I was hoping to just fix these issues to stave off disaster until I can convince them of the ROI of a redesign. 我知道最好的方法是继续将它们替换为div或带边界半径的其他语义元素,但是暂时我只是希望解决这些问题,以免造成灾难,直到我可以说服他们的投资回报率重新设计。

Let those images float. 让那些图像浮动。

#Table_01 img { 
    float: left;
}

尝试添加以下CSS:

#Table_01 a img { border:0; margin:0; padding:0; }

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM