Hi Pode (or anyone else),
I am trying to use your iFrame plugin, but can't quite make it work right. I have a couple of problems. Please help?
1- I have a game that is sized 470x600
2- Inside it, I created a 460x306 iFrame
3- On the iFrame's properties I set:
URL: saferplace.org/img/fotos01/01.jpg
Style: game.css
(I put the game.css file in the same folder as index.html)
I need the iFrame to display the URL image downsized so it fits.
I can't resize the original image manually, as I plan on having the iFrame display different sized images, some bigger than the iFrame, some smaller. The smaller ones should not upscale but remain their original size.
When I run the game in preview mode, the example image properly downsizes. Also, smaller images behave correctly (no upscaling). But if I run the game from a web server, the image is undesirably scaled 100% original size and I get scroll bars.
So my first problem is: how to make the big images downscale to fit (and keep aspect) when running the game online.
The game.css I created reads:
iframe img{width:100%; height:auto; max-width:460px; max-height:306px; margin:0 auto; text-align:center;}
iframe {border:0; border:none; overflow:hidden;}
But I think the iFrame is not using the CSS at all.
So my second problem is, how to properly utilize the CSS?
You can check the test version here:
link to the game test version:
dl.dropbox.com/u/17328032/CodeGame/index.html
Any help is appreciated.
Thank you very much