0

I have an IFRAME inside a dijit/layout/contentpane.

When the Iframe html renders larger than the contentpane size, there are no scrollbars at the or contentpane

Using overflow: auto doesn't help.
Setting the iframe's scrolling=yes displays scrollbars that do not work. When I set the iframe e.g. height=1000, the contentpane then does provide scrollbars. (problem there is that the iframe declaration has no idea in advance how big the content that it will render will be, to be able to guess/kludge a height)

Any suggestions?

steve
  • 1
  • 1

1 Answers1

1

It would be better you can post your code, I have an iframe in ContentPane and it works correct. Here is my code (the point is you need set width and height 100%):

    var reportCP = new ContentPane({
        region: "center",
        className:"wpt-report-pane",
        content: put("iframe.wpt-iframe") // Here I use put-selector,you can use dojo.create as well
    }).placeAt(myBorderContainer);   

And Css classes:

.wpt-report-pane{
    background-color:#ddd;
}

.wpt-iframe{
    border: 0; 
    width: 100%; 
    height: 100%;
}
Sean Zhao
  • 1,506
  • 12
  • 12
  • The key here is definitely `width: 100%` and `height: 100%`: you need to make sure your content always fills up the `ContentPane`. – Thomas Upton Sep 28 '13 at 21:37