1

Here is the entire file. I thought it might be a reset issue so I set height to 100% for both the body and the iframe. View here - www.arcmarks.com/video. Please do not repost.

I want it to take up the entire page.

<!DOCTYPE html>
<html>
<head>
    <title>test</title>
</head>
<body>

    <style>
        .if {
            width: 100%;
            height: 100%;
        }

        body {
            width: 100%;
            height: 100%;
        }
    </style>

    <iframe class="if" name="result" sandbox="allow-forms allow-popups allow-scripts allow-same-origin allow-modals"
            frameborder="0" src="//fiddle.jshell.net/kizu/zfUyN/show/"></iframe>

</body>
</html>
CoderPi
  • 12,985
  • 4
  • 34
  • 62
cade galt
  • 3,843
  • 8
  • 32
  • 48

4 Answers4

2

The body and html are of full width only. It is by jsfiddle.net, your view is limited to a height of 148px. Please check below:

Solution

Since you cannot control jsfiddle.net, having html, body {height: 100%;} also might work. Please try checking with the API to get the full width. There's an option to share full screen embed. Please try that.

Praveen Kumar Purushothaman
  • 164,888
  • 24
  • 203
  • 252
1

You need to add html { height: 100%; } to your CSS.

DEMO

Here's the explanation:

Community
  • 1
  • 1
Michael Benjamin
  • 346,931
  • 104
  • 581
  • 701
  • Kindly check my answer. Do you agree with mine? The height is not limited by the HTML. The OP has given right code, but the problem lies within the other domain. – Praveen Kumar Purushothaman Dec 05 '15 at 16:11
  • 1
    @PraveenKumar Yes, I see your answer. But the OP has stated in question comments and your answer comments that *html 100%* works. So what am I missing? – Michael Benjamin Dec 05 '15 at 16:13
0

See this fiddle

For the iframe to take 100% height, you need to set the height of html along with body to 100%.

Thus the updated CSS would be as below

CSS

html,body {
        width: 100%;
        height: 100%;
    }

As a note, you have to mention the <style> inside the <head> tag and not inside the <body> tag.

Lal
  • 14,726
  • 4
  • 45
  • 70
0

Use position:absolute in css of the iframe.

.if {
  position:absolute;
  height:100%
  width:100%
}
Brad Koch
  • 19,267
  • 19
  • 110
  • 137