开发者

IFrame scrollbar issue in IE7

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,t开发者_运维百科his.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.


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜