开发者

How to fix table going outside of div tag in IE6 & 7?

开发者 https://www.devze.com 2023-02-22 10:51 出处:网络
If a table is too big and the window is too small than the table goes outside the div. I solved this with display:table !important; on the surrounding div but it doesn\'t work in IE 6&7 because t

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

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?

See JSFiddle example: http://jsfiddle.net/K开发者_StackOverflow社区evin1990/LNS26/10/


Instead of using display: table, use float: left.

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

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消