I need some help. I have a test webpage that is basically just an image that is 480 pixels wide. I want the image to be sized to the width of Android's browser in both horizontal and vertical modes. It works great on iPhone but it's giving me problems on Android in portrait mode. You can see an example at:
http://www.pixeldigital.com/test/
For the viewport meta tag I'm using this:
...but I've tried many different variations. I've set width=480 and tried different combinations of other parameters like maximum-scale and minimum-scale.
It works OK on Android in vertical mode, but not in horizontal mode. In horizontal mode there is quite a bit of blank space to the right of the image. Everything works great on iPhone because it scales the image when you switch to horizontal mode.
I know one way to accomplish this is to set the image to 100% width, but this webpage is just a test. The final website will have multiple pieces to the image, so I can't set each piece to 100%. That method doesn't sound clean anyways. You can also accomplish it with JavaScript, but I'd much rather do it with the viewport meta tag. Plus the javascript method would get real tedious with a lot of images.
Can anyone help me out with this? It's pretty frustrating, especially since it's so easy to do on iPhone...
Thanks for any advice
http://www.pixeldigital.com/test/
For the viewport meta tag I'm using this:
...but I've tried many different variations. I've set width=480 and tried different combinations of other parameters like maximum-scale and minimum-scale.
It works OK on Android in vertical mode, but not in horizontal mode. In horizontal mode there is quite a bit of blank space to the right of the image. Everything works great on iPhone because it scales the image when you switch to horizontal mode.
I know one way to accomplish this is to set the image to 100% width, but this webpage is just a test. The final website will have multiple pieces to the image, so I can't set each piece to 100%. That method doesn't sound clean anyways. You can also accomplish it with JavaScript, but I'd much rather do it with the viewport meta tag. Plus the javascript method would get real tedious with a lot of images.
Can anyone help me out with this? It's pretty frustrating, especially since it's so easy to do on iPhone...
Thanks for any advice