How to resize a webpage to fill an iframe

My coding skills are a bit out of practice these days – I hack about in PHP a fair bit but in terms of CSS I need to brush up. So when someone said to me – can we resize a webpage into an iframe so we syndicate the content I thought no prob.

And TBH its so easy even I worked it out in under 10 minutes, using no JavaScript, with only Google for assistance. You know when I say that I had to cobble together stuff from Google as TBH I didnt really like the responses I was getting.

So the code below is what I’ve came up with…

<iframe style=”transform: scale(0.4); -webkit-transform: scale(0.4); -webkit-transform-origin: 0 0; -moz-transform: scale(0.4); -moz-transform-origin: 0 0; -o-transform: scale(0.4); -o-transform-origin: 0 0; -ms-transform: scale(0.4); -ms-transform-origin: 0 0; margin-bottom:-400px;” src=”” height=”800″ width=”1200″></iframe>

Which displays as :

Anyway there is another implementation over @

Post By Michael Briggs (154 Posts)

Twitter handle : @michaelkebriggs

Website: →



  1. John
    Posted July 26, 2013 at 1:05 pm | Permalink

    Fantastic, many thanks I’d been trying to do something similar on my own site!

  2. brett burton
    Posted September 12, 2013 at 8:40 pm | Permalink

    thanks! this code works great. I saw like 20 other awful solutions that were more complicated and didn’t work.

Post a Comment

Your email is never shared. Required fields are marked *