Problems with IE7- DIV not taking parent DIV attribute of overflow:auto; [duplicate]
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.
精彩评论