显示:table-cell在IE9不工作? [英] Display:table-cell not working in IE9?

查看:747
本文介绍了显示:table-cell在IE9不工作?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个表,其中我使用CSS显示属性来改变布局。对于全尺寸的浏览器,我使用块,对于较小的浏览器,我使用table-cell。
它在Firefox,Safari和Chrome中工作的很好,但不知何故IE9似乎混乱了当然...
当我使用Firebug等调试页面,很明显,除了IE的所有浏览器更改显示:table-cell显示:block。但是IE仍然显示:block即使CSS文件清楚地表明它应该是table-cell。



在IE9中有table-cell有任何已知的问题或任何已知的工作周围?



编辑:
问题不在于table-cell,它与表单元格上的Display:

我遇到的问题可以在这里找到: http:// css-tricks.com/reamples/ResponsiveTables/responsive.php
在Chrome / Firefox中打开并调整浏览器窗口 - 表格是响应式的,并改变为狭窄的设计。
在IE9中打开并调整大小 - 表是静态的,不会改变。



EDIT2:
在上面的例子中,响应部分被注释掉对于IE,因为创建者知道它会是凌乱的。不过,我想要能够创建这样的设计,在IE中工作,所以我需要一些解决方法,使它工作。



这里是一个JSFiddle,显示如何IE9混乱响应表时,包含的reponsive部分: http://jsfiddle.net/2Mt37/

解决方案

我发现了一个旧线程的答案,@thirtydot写了


我将 float:left 应用于内容。




正如他所说,它是一种有效的工作... IE9停止渲染的东西都疯了,但还有som对齐做,使它看起来不错。
但是这个答案够好了,我可以自己修复...


I've got a table where I'm using the CSS display property to alter the layout. For full size browsers I use "block" and for smaller ones I use "table-cell". It works great in Firefox, Safari and Chrome, but somehow IE9 seems to mess it up of course... When I debug the page using Firebug and the likes, it's clear that all browsers except IE change the display:table-cell to display:block. But IE is stuck with display:block even though the CSS file clearly states it should be table-cell.

Is there any known issues with "table-cell" in IE9 or any known work arounds?

EDIT: The issue is not with table-cell, it's with Display:block on a table cell.

The problem I'm having can be found here: http://css-tricks.com/examples/ResponsiveTables/responsive.php Open in Chrome/Firefox and resize browser window - the table is responsive and changes to a narrow design. Open in IE9 and resize - the table is static and does not change.

EDIT2: In the previous example the responsive part is commented out for IE, because the creator knew that it would be messy. Nevertheless, I want to be able to create this kind of design that works in IE as well, so I need to make some kind of workaround for it to make it work.

Here is a JSFiddle that shows how IE9 messes up the responsive table when reponsive part is included: http://jsfiddle.net/2Mt37/

解决方案

I found the answer from an old thread, where @thirtydot wrote

I applied float: left to stuff. It kinda works.

How can I make "display: block" work on a <td> in IE?

As he said, it kinda works... IE9 stops rendering stuff all crazy, but there's still som aligning to do to make it look good. But that answer is good enough, I can fix the rest myself...

这篇关于显示:table-cell在IE9不工作?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆