Where its all Begins

Thanks for visited our website.

World Finance Invest Inc. - Most Popular Article

We are here to BRING a some free webmaster tools, improve your website ranking !!!!

 LATEST ARTICLES POST

 MOST POPULAR ARTICLE

 Crypto From Faucets

     What is Faucets?
     How to start earning

 MAKE MONEY ONLINE

     10 Ways to Earn Cryptocurrency

 Online Business

     Investment - Project2x.biz

 World Wide News

     The Caribbeans Economies

 Investment Strategies

     How to be Trader, Beginner
     Manage the Risks Trading

How to set the iframe height & width to 100%

Any site using iframe but not all use responsive or using script for make the better one iframe, on here, we will try to make a simple one.

Questions 1:
I have a header content which is 70px and an iframe with a wrapper. The height & width of the iframe has to be set to 100% without scroll, except for the scroll that comes for the body when the content is loaded and the size of the content is more.

Questions 2 :
The content of the iframe is another HTML page from the same domain. The iframe also needs to scale according to the responsive HTML page.

Ok, To answer the question ? first we read the code, CSS only solution for 100% width and height and responsive.

HTML Code:

[div class="container"]
    [div class="h_iframe"]
        [iframe  src="//www.youtube.com/embed/9KunP3sZyI0" frameborder="0" allowfullscreen][/iframe]
    [/div]
[/div]

CSS :

    html,body {
    height:100%;
}
    .h_iframe iframe {
    position:absolute;
    top:0;
    left:0;
    width:100%;
    height:100%;
}
Done, easy and simple. you will see full screen preview on your homepage.


— Are this's article help you,
please help to share !!!