Thanks for the quick reply. I revised the code as you have it here but the pages still only show up correctly on the 640x960 mobile preview. I tried both event 'load' and 'resize'. I must be missing a step somewhere?
Thanks for the quick reply. I revised the code as you have it here but the pages still only show up correctly on the 640x960 mobile preview. I tried both event 'load' and 'resize'. I must be missing a step somewhere?
Hi Mike - can you give us public link?
Sorry...pretty new on Appery. Is this what you need (link to preview?):
http://appery.io/app/mobile-frame?src...
I don't see an option to share a public link.
Thanks Mike we'll take a look, it's enough. How to make a public link you can check it here by the way: http://docs.appery.io/documentation/s...
Hi Mike,
what I also did is setting the dimensions of your width in %, so just calculate how much width you want for your image, and I set my height to just auto.
Hi Mike -
Your app differ from Pauls.
You have background instead of an image.
That's why solution suggested from Paul not suitable for you.
You have to use following property:
pre
background-size: cover
/pre
You can read more about it here: http://www.w3schools.com/cssref/css3_...
So the right code for your app would be:
pre
Appery("mobilemain").css("background-size", "cover");
/pre
Thanks for the feedback. I tried a few things and worked with the background cover code above. Still can't seem to get it to fill the background in all instances. When I use the 'cover' code the image looks good on smaller screens but won't fill above 320x480 (won't fill vertically). Leave that line off and it looks good on the larger screens but not the smaller ones (image size stays constant). I removed all buttons and other elements so just need to lock in the one graphic. Have you come across this before? Thanks again.
It seems to be working correctly in landscape mode but doesn't format for vertical.
Hello!
There are two ways:
1) Have two images for landscape and portrait mode and check with JS what image to show
2) Use prebackground-size: 100% 100%/pre in this case proportion won't be saved.