如何修复表在IE6& 7? [英] How to fix table going outside of div tag in IE6 & 7?

查看:162
本文介绍了如何修复表在IE6& 7?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果表太大,并且窗口太小,则表格不在div之外。

If a table is too big and the window is too small than the table goes outside the div.

我使用 display解决了这个问题: table!important; 在周围的div,但它不工作在IE 6& 7,因为他们不知道。我怎么能解决这个在IE6& 7?

I solved this with display:table !important; on the surrounding div but it doesn't work in IE 6&7 because they don't know it. How can I solve this in IE6 & 7?

请参阅JSFiddle示例:
http://jsfiddle.net/Kevin1990/LNS26/10/

See JSFiddle example: http://jsfiddle.net/Kevin1990/LNS26/10/

推荐答案

而不是使用 display:table ,使用 float:left

http://jsfiddle.net/thirtydot/LNS26/16/

如果你没有指定一个显式的 width

This makes use of the "shrink wrap"/"shrink to fit" effect you get on a floated element if you don't specify an explicit width.

这篇关于如何修复表在IE6& 7?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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