Reputation: 3790
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
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