日期:2014-05-16  浏览次数:20574 次

iframe大小的问题
我在网页中嵌套了另一个页面(A),A页面单独浏览时一起正常。但嵌入网页后不管怎么设置A的宽度总是很短。如图

嵌入代码如下:
</div>
<div id="c0" class="content"><?php
if('总经理'==$_SESSION['position']&&'1'==$_SESSION['access_right']){
//readfile("a_sales_brief.php");
?>
<iframe src="http://localhost:80/cognos8/cgi-bin/cognos.cgi?b_action=cognosViewer&ui.action=run&ui.object=%2fcontent%2fpackage%5b%40name%3d%27%e6%b5%8b%e8%af%95%e9%94%80%e5%94%ae%e6%95%b0%e6%8d%ae%e5%8c%85%27%5d%2freport%5b%40name%3d%27levelA1%27%5d&ui.name=levelA1&run.outputFormat=&run.prompt=true&cv.toolbar=false&cv.header=false" frameborder='0' width=1100px height=900px align="left"></iframe>
<?php

包裹iframe的div的css如下:
.content{
width:1100px;
height:900px;
display:none;
padding:5px;
overflow-y:auto;
background-color: #FF0000;
overflow: visible;
position: relative;
}

请大神指教怎么让iframe宽度变大

------解决方案--------------------
iframe的宽度改为100%试试。