[RESOLVED] Div overflow: problem with scrollbars in IE7
Hello,
I got stuck trying to solve a problem with div overflow in IE7.
I have a div whose content is loaded through an Ajax request.
The HTML I get through Ajax looks like this:
HTML Code:
<div style="padding:10px"><div style="width: 95%; height:200px; align: center; overflow-x:hidden; overflow-y:auto"><table style="width:100%"><!-- Table content - All cells in first column have a checkbox --></table></div></div>
What I expect is: if the table height is greater than 200px, the vertical scrollbar is shown, and the horizontal scrollbar is always hidden. This works correctly in Firefox and IE6, but it does not work in IE7.
The result I get in IE7 is: after the div content is reloaded, no scrollbar appears at all. But if I check any of the checkboxes in the first column, the vertical scrollbar appears over part of the column in the right, so I would need to modify horizontal scrollbar visibility only in that case.
How can I solve this?
Thanks in advance for your help.
This is something very similar to the first link posted by Kor. The solution I applied is adding position:relative to the container div and position:absolute to the table. After this, I only needed a minor table width adjustment to make it completely visible in IE7, but that's all. It works perfectly with Firefox.
Thanks a lot to both, Ribeyed and Kor, for your help.
Regards,
Bookmarks