# Disappearing scrollbars in IE



## jhgreene (Feb 2, 2007)

Hi -
I'm displaying an html table on a page. It is absolutely positioned (and must remain so), and has an allotted position and area where it has to be. I use the "overflow:auto" style so when it gets displayed, scrollbars will be used when needed.

I'm rerendering this table on the page via ajax in response to an onchange event on a select box. All that is working fine, except that in IE7, when a large table needing scrollbars is rerendered, it renders with the scrollbars missing. I can get them to reappear if I try to find them with the mouse by clicking around until I actually click on one of them. Even without the scrollbars, the table scrolls with the mouse wheel, though.

I can't seem to find any definitive solution to this diappearing scrollbar problem. Has anyone seen this and perhaps know of a solution? Thanks.
- Joe


----------



## Najkiie (Jun 30, 2008)

try to download Internet Explorer from microsofts website and when you come to the part where you are asked what you want to do.. choose "Repair". If it doesnt work i recommend you trying FireFox.


----------



## rlaserra (Aug 5, 2008)

Its located in your style sheet. It seems that you set that overflow command in the body of the html file and it might be effecting all of the website. Are you using style sheets or are you declaring the styles in the beginning of the html or asp file, I would use a <div> container in the style sheet itself position the table using your editor then set the overflow: scroll; .... try setting it to scroll in your code and let me know.


----------



## jhgreene (Feb 2, 2007)

Hi -
For styles, I use a combination of stylesheets and inline style definitions. I've used scrollable divs before with no problem. The big difference this time is that the div is being rerendered as the result of an ajax call that updates the table on the server. The overflow property value needs to be set to "auto" because if scrolling is not needed (because the table being rendered has few rows), I don't want the scrollbars.

- Joe


----------



## rlaserra (Aug 5, 2008)

if you dont want scroll bards try overflow: hidden; as a property that works for me. I dont know if ajax is any different. I will keep doing research though please make sure that you post the final result just incase


----------



## jhgreene (Feb 2, 2007)

Thanks again for the reply. Let me be very clear this time. I didn't mean to make you think that I don't want scrollbars. I want the scrollbars if and only if they are needed. I render the table in a div element that has a maximum height set thru a style. If the table that loads is too large for the div, the scrollbars are to be applied automatically. 

This works perfectly in Firefox 2. Under normal circumstances (i.e., non-ajax), this also works in IE - I've done this many times before. Like I said, the only difference is that the table is being rerendered via ajax.

If you come up with a solution, that is great, but don't spend your time researching this - I just thought there might be a quick solution, and I'm going to have to look into this more later, since I have had to move on and accept this behavior for now. If/when I find a fix or workaround, I will post it here. Thanks again.

- Joe


----------

