问题
I have a div which have a literal which is filled at runtime. The overflow of that div is set to auto but still in IE its showing the contents. However the scrollbar is also appearing but the content is going beyond div and scroll is not working. Any idea?
回答1:
Did you set the containing DIV to "position: relative"? See this as a reference:
http://snook.ca/archives/html_and_css/position_relative_overflow_ie/
回答2:
Without some example code it's not really possible to tell where the problem is.
Does the div has a set height and/or width? overflow:auto
only works when the rendering engine knows when it should start displaying scrollbars.
来源:https://stackoverflow.com/questions/7079361/html-overflow-auto-not-working-on-ie