Iframe always showing scroll bars in IE7

后端 未结 3 1491
时光取名叫无心
时光取名叫无心 2020-12-31 12:00

Having an annoying issue in IE7. I have a website where, at the bottom of every page theres an Iframe, and for the life of me I cannot get the scroll bars to hide. This is o

相关标签:
3条回答
  • 2020-12-31 12:30

    adding scroll="no" to the body of my iframe target page worked for me. In total, here's the additional cruft I've added to my iframe for various browsers, perhaps this will help someone else:

    iFrame source HTML:

    <body style="overflow:hidden;" scroll="no">
    

    iFrame tag on page:

    <iframe width="280" height="196" src="http://dev.example.com/source.html"
    style="overflow:hidden;" marginheight="0" marginwidth="0" frameborder="0">
    </iframe>
    
    0 讨论(0)
  • 2020-12-31 12:38

    Try setting the BODY tag of the IFRAME content to <BODY scroll="no"> and add the following CSS the content's page:

    html 
    { 
         overflow:hidden; 
    }
    
    0 讨论(0)
  • 2020-12-31 12:46

    By using jQuery from parent page

    <script type="text/javascript">
    $('#iframeid').contents().find('body').css('overflow', 'hidden');
    $('#iframeid').contents().find('body').attr('scrolling', 'No');
    </script>
    

    Use this, it should work.

    0 讨论(0)
提交回复
热议问题