Hi I have an html page with big image in it. I am using this html page path as src of an iframe. When it loads the html page to iframe it goes out of size of iframe. I want to resize the or make html smaller or I dont know scale maybe to fit the dimensions of the iframe.
Asked
Active
Viewed 109 times
0
-
give iframe {width:100%}.it will work fine !! – Krish Feb 13 '14 at 10:07
-
also there is something called "responsive design". if you resize your browserwindow (or infact an iFrame), your elements should get resized too (and sometimes even reordered). – Vogel612 Feb 13 '14 at 10:08
-
@Nikhil no it is not.@Vogel I tried giving absolute values to iframe but nothing changed if this is what you mean? – MCanSener Feb 13 '14 at 10:12
-
If the domain of iframe page and your page is same you can use CSS for styling the content inside iframe. But if iframe gets from another domain it is a different story. As far as I know changing the content of different domain is not allowed due to security reaosons. Here is a similar question: http://stackoverflow.com/questions/217776/how-to-apply-css-to-iframe – aliassce Feb 13 '14 at 10:28
-
@aliassce It is an article for implementing css style sheet to external pages. What I am trying to do is to style that sheet internally to show in iframe as scaled or fit in the dimensions of it like a parent or style the iframe to fit the content to iframe dimensions. (Code snippet or code example) – MCanSener Feb 13 '14 at 11:12