<fieldset>
        <legend>报表预览区域</legend>
        <div id="divHtmlReport" style="display: none; background-color: #00ccff;" runat="server">
        </div>
    </fieldset>div 里的内容为:<div id="divHtmlReport" style="display:;background-color:#00ccff;"><iframe runat="server" style="width:100%;height:100%;" src="Http://localhost/xmes_develop/CustomReport/Output/5eda92c3-8037-4acc-bd04-da5619497b0e/2010-06-28-143937_20100628144937.htm"></iframe></div>
现在显示的结果,如下图所示样式如何设置让预览的这个html铺满整个界面。

解决方案 »

  1.   

    看来还是height的问题啊,width和height一样,设百分比都是占父元素的百分比,楼主把iframe的所有父节点全设置成100%试试
      

  2.   

    看起来像是iframe里面的页面只有那么大LZ设置div全屏试试勒
      

  3.   

      //注册窗体改变大小事件   
    $(document).resize(function(){         setwidth();
           
     }); function SetWinHeight(obj)
    {       var win=obj;
            if (document.getElementById)
            {        if (win && !window.opera)        {
            if (win.contentDocument && win.contentDocument.body.offsetHeight) 
               
            win.height = win.contentDocument.body.offsetHeight; 
                
            else if(win.Document && win.Document.body.scrollHeight)
               
            win.height = win.Document.body.scrollHeight;
            
            }
            }}<iframe id="myiframe" src="../task/inh.html" frameborder="0" name="jjj" scrolling="no"  onload="Javascript:SetWinHeight(this);"   width="100%"  height="" ></iframe>
    这是我项目里面iframe引用另一个页面的js,lz看看吧
      

  4.   


     <style type="text/css">
        html,body{height: 100%;margin: 0; padding: 0; overflow:hidden;}    </style>
      

  5.   

    我的应该可以,如果不行的话,把div和fieldset的height也100%
      

  6.   

    外面的Div大小没设置,只设置iframe的大小是100%没什么意义啊,没有参照。
    应该先设置外面的Div的大小
      

  7.   

    本来不会有什么问题的
    主要加了个<fieldset>标签就不行了
      

  8.   

    应该把div层的height 和 width均设置成100%,原来你设置的div意思是铺满div的宽和高,现在只要把div 宽和高设置随之变动应该就可以了