开发者

Problems with IE7- DIV not taking parent DIV attribute of overflow:auto; [duplicate]

This question already has an answer here: IE7 CSS Scrolling Div Bug (1 answer) Closed 2 years ago. 开发者_开发问答

I am developing a site that has a specified height to it. I have made a DIV and defined the height and added the CSS property overflow:auto. Within this DIV I have another that contains my content and other specific styling. In all other browsers the inner content scrolls vertically just fine if it is longer than the specified height outer DIV height. However, in IE7 (probably in 6 as well) the inner DIV is overflowing the outer DIV. To me it looks like IE7 doesn't see that this DIV is actually a child so it ignores the overflow:auto.

Any ideas what I may need to change?


Do you have set widths on the divs? I know both IE7 and IE6 have issues with overflow:auto; sometimes if there are no set widths, so you should try adding them to be sure. Also try adding display:block; on both divs (particularly the inner div).

If you haven't use it already, Firebug Lite is an awesome tool for testing CSS in the IEs.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜