views:

34

answers:

1

I am working with an IFrame and I can't seem to figure out a way to disable only the horizontal scrollbar in IE7. I need the vertical scrollbar but I want to completely disable the horizonal bar.

Check out the IFrame setup here: Iframe Example

I have disabled horizonal scrolling in the other browsers using:

overflow-x: hidden;
overflow-y: scroll; 

But this doesn't seem to work in IE7. Any ideas?

EDIT: I put the horizonalscrolling line in the Iframe tag thus:

<script type="text/javascript">
      var GB_ANIMATION = true;
      $(document).ready(function(){
        $("a.greybox").click(function(){
          var t = this.title || $(this).text() || this.href;
          horizontalscrolling = "no";
          GB_show(t,this.href,560,800);
          return false;

        });
      });
    </script>

I also disabled scrolling on the body element in the outerpage:

html {
overflow-x: hidden;
}

Neither of these solutions have solved the problem.

A: 

Two approaches:

  • The scrollbar isn't a property of the <iframe> tag, it is a property of the page that it contains. Try putting overflow-x: hidden on the <html> element of the inner page which is included in the iframe.

  • horizontalscrolling = "no" (this is not on documentation though)

It is also interesting to note that you can hide all scrollbars by using scrolling = "No" on the iframe tag.

Sarfraz
I just updated with your suggestions but I still can't seem to sort out the IE issues. See above -
Thomas
@Thomas: Did you try both approaches, also try the overflow on body element.
Sarfraz
Yes - http://designvillain.com/quittance/styles/styles.css
Thomas