PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Tuesday, November 29, 2022

[FIXED] How do I make an HTML iFrame fit the whole page without needing to scroll?

 November 29, 2022     css, embed, html, iframe     No comments   

Issue

I need to use an iFrame within another page, and I want to make it fit the entire web page that it's embedding without the need to scroll. So, how can I set the iFrame height to the height of the web page?

I tried just setting the iFrame height to 100%, but for obvious reasons, that did not work.

I'm sure the answer is simple, I'm better at the back end.


Solution

html,body{
            width:100%;
            height:100vh;
            overflow:hidden;
            margin:0px;
            padding:0px;
            border:none;
        }
        iframe{
            width:100%;
            height:100vh;
            overflow:hidden;
            margin:0px;
            padding:0px;
            border:none;
        }
<iframe src="https://blogger.com" name="otherSite"></iframe>



Answered By - tatactic
Answer Checked By - Robin (PHPFixing Admin)
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing