开发者

Iframe to fill out the window size

开发者 https://www.devze.com 2023-03-28 03:08 出处:网络
How can have the iframe to automatically takeup the whole space. http://speedywap.com/ihome/?url=http://dell.com/ for example ha开发者_如何学编程s the iframe only open upto half the window in mozilla

How can have the iframe to automatically takeup the whole space.

http://speedywap.com/ihome/?url=http://dell.com/ for example ha开发者_如何学编程s the iframe only open upto half the window in mozilla firefox and ie6

How can I make sure that takes the maximum size of the screen. Is there a css or js to do this?


This should do the trick.

Option 1:

Since you are trying to use z-index you can just add position:absolute to .sourceView.

body {
    color: #000000;
    font-family: Verdana,Arial,Helvetica,sans-serif;
    font-size: 12px;
    overflow: hidden; /* add this to stop any double scrollbars */
}

.sourceView {
    height: 93%;
    width: 100%;
    z-index: 10;
    position: absolute; /* add this */
}

Option 2:

html,body{
    height:100%;
}
body {
    color: #000000;
    font-family: Verdana,Arial,Helvetica,sans-serif;
    font-size: 12px;
    overflow: hidden; /* add this to stop any double scrollbars */
}

Option 3:

I have a javascript/jQuery solution over here:
Static container height combined with a dynamically sized container, possible?

http://jsfiddle.net/tw16/X5rWb/

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号