[RESOLVED] Div overflow: problem with scrollbars in IE7
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:
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.
<div style="width: 95%; height:200px; align: center; overflow-x:hidden; overflow-y:auto">
<!-- Table content - All cells in first column have a checkbox -->
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 a common problem. Have a read of this article:
problem with div overflow in IE7
hope that helps
Last edited by Kor; 01-27-2011 at 07:57 AM.
Yes, I found that the link provided by Ribeyed did not work, but I also found this thread that helped me:
Table in div does not get scrollbars in IE7
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.
-- no music, no life --
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Tags for this Thread