0

I have created an iframe within my site. It loads when I click on another part of the site. However I dont want it to show the scrollbars but they are showing even with the property set to no as shown in my code. Does anyone have any ideas?

<iframe id="theFrame" src="" style="width:800px; height:450px; border:0px solid black; overflow:hidden;" scrolling="no"></iframe>
Jean-Charles
  • 1,690
  • 17
  • 28
Ctrl_Alt_Defeat
  • 3,933
  • 12
  • 66
  • 116
  • Is the iframe showing a 3rd party site or somewhere within your own site. If the latter have you tried using a user control instead – Daniel Casserly Nov 17 '11 at 12:59
  • The iframe is showing another page in my solution - developing in Visual Studio 2010 – Ctrl_Alt_Defeat Nov 17 '11 at 13:03
  • could you not make the important information a user control and drop it on to the page? – Daniel Casserly Nov 17 '11 at 13:11
  • @DanielCasserly - got it sorted - as one of the posters said below - the page I am opening in the iframe - I didnt have the overflow : auto changed it in. I changed it in that page to overflow : hidden and it worked fine – Ctrl_Alt_Defeat Nov 17 '11 at 13:15

2 Answers2

2

Got this sorted - I was opening another page in my own solution in this iframe.

<style type="text/css">
html, body {
    height: 100%;
    overflow: auto;
}
body {
    padding: 0;
    margin: 0;
}
#silverlightControlHost {
    height: 100%;
    text-align:center;

}
</style>

I needed to change the overflow to hidden on this page and it worked fine.

Ctrl_Alt_Defeat
  • 3,933
  • 12
  • 66
  • 116
-1

You could try adding overflow:hidden; to the style properties.

Nate B
  • 6,338
  • 25
  • 23
  • 1
    There is aleady `overflow:hidden;` in the style properties. – Jean-Charles Nov 17 '11 at 13:00
  • 1
    Oops, coffee needed. Sorry. There are some helpful posts here, though: http://stackoverflow.com/questions/1691873/safari-chrome-webkit-cannot-hide-iframe-vertical-scrollbar – Nate B Nov 17 '11 at 13:02
  • yes, should be: set overflow: hidden on the HTML tag of the page inside the iframe. But I think `style="width:800px; height:450px;"` forces to show the scroll. – Jean-Charles Nov 17 '11 at 13:06