Jaume
Jaume

Reputation: 3790

fit webpage content on a fixed size iframe

Is there any javascript, ajax, css or any other method to get a webpage content fitted on a fixed widht iframe? Like mobile device browser does. Thank you.

Upvotes: 1

Views: 1810

Answers (1)

frenchie
frenchie

Reputation: 51997

You define a container div with a fixed width (say 400px) and set that div to overflow hidden. That will force the content of that div to stay within the 400px width. You put all the content that you want to have in the iframe in that container div. And then, you put that div inside the iframe.

I think that'd be the easiest way to do it.

Upvotes: 1

Related Questions