views:

425

answers:

5

Is there a way to shrink what's inside an iframe without adjusting css?

any magical 'zoom' parameter out there?!!!

I have a 600px preview iframe i want to fit a 1000px site in without scrollbars...

+1  A: 

I'm afraid not. Your only option would be to use site-specific CSS modifiers to reduce font and element size.

Seidr
+2  A: 

Well, in short no.

You can use in-line CSS to set the width/height to 600px and then also set the overflow:hidden

thecoshman
Ah true - my assumption was that the poster wanted the WHOLE site visible.
Seidr
Well, I assumed the same thing really. Hopefully, he is not wanting to shrink the site down to fit into the smaller preview. That you can't do... less you do some server side rendering of a page, saving output, shrinking etc etc etc
thecoshman
well, you can shrink the site to fit in the iframe, clientside, cfr. my answer below :)
futtta
A: 

You could create a thumbnail of the website. The user could not interact with it, but maybe if you added a link, the user could go to the actual site.

I don't know if that's the best program, but that was what Google gave me.

bradlis7
+2  A: 

If you control the Iframe-content, you might find this little hack of mine useful: http://futtta.be/squeezeFrame/

It's a cross-browser standalone javascript thingy that tries to automatically adjust the size of the page it's called from to the available size of the Iframe using css zoom and moz-transform.

futtta
A: 

Futtta, what if you don't control the iframe content (i.e. framing a page on an external site)?

Marc Nogle