0

Is it possible to resize iframe to 100% on my website from tumblr? I've tried many option but with just jQuery I get CORS issues, tried also plugins like: https://github.com/Sly777/Iframe-Height-Jquery-Plugin https://github.com/davidjbradshaw/iframe-resizer

Still can't get 100% height iframe, for example I would like to do 100% of this page:

<iframe src="https://www.tumblr.com/tagged/sample" width="100%" scrolling="no"></iframe>

I don't want it to be position absolute, it need to be inside of content, so this: Full-screen iframe with a height of 100% is not solution for me

Community
  • 1
  • 1
dfg5rte4
  • 51
  • 4
  • 1
    possible duplicate of [Full-screen iframe with a height of 100%](http://stackoverflow.com/questions/5867985/full-screen-iframe-with-a-height-of-100) – vard Aug 18 '15 at 13:18

1 Answers1

0

You can style iframes to fill the whole page, with simple css. Take a look at this example i made for you: https://jsfiddle.net/bjornnyborg/jx0wjvp9/

body,html {
    height:100%;
}
iframe {
    width:100%;
    height:100%; /* you can also use "100vh" */
}

Notice that if you want to use 100% height, all the ascending elements has to have 100% height too, including the body and html tags.

The easier way is just to use "height:100vh;"

Hopefully that answered your question! :)

Bjørn Nyborg
  • 993
  • 7
  • 17
  • unfortunately, I tryed this - if I place iframe to content with this rules it does not work with tumblr – dfg5rte4 Aug 18 '15 at 13:30
  • Can you provide a link to your tumblr page? And do you have access to edit css in tumblr pages? Otherwise you can do the same style, but inline on your iframe, it will look like this: – Bjørn Nyborg Aug 18 '15 at 13:34
  • height:100vh is not solution, my tumblr is about 3000px height – dfg5rte4 Aug 18 '15 at 13:38