Page 1 of 1

Stretch image to whole page?

Posted: Sat Jun 08, 2013 12:59 pm
by andi

How can i stretch an image to the whole page?
I would like to preserve aspect ratio and the image has to be as big as possible

I get it working for if i have the screen 320480 but if i switch to landscape to 480320 - it doesn't work?

has someone an example how i can make this?


Stretch image to whole page?

Posted: Sat Jun 08, 2013 1:17 pm
by Alena Prykhodko

Andreas,

You can do it with custom CSS
Set Image's Class Name, create New CSS with following code:
code
.ClassName {
width: 100% !important;
height:100% !important;
}
/code

Change width/height values to choose the image size you need.


Stretch image to whole page?

Posted: Sat Jun 08, 2013 2:56 pm
by andi

The problem is, if i use this code, the image will be strechted without preserve aspect ratio!


Stretch image to whole page?

Posted: Sat Jun 08, 2013 5:55 pm
by Illya Stepanov

Hi Andreas - try using JavaScript on page Load event like this:
codeAppery('mobileimage_20').width('auto').height('auto');
Appery('mobileimage_20').parent().width('auto').height('auto');/code
where 'mobileimage_20' is a name of your image component.


Stretch image to whole page?

Posted: Wed Dec 11, 2013 7:09 am
by Ketan Patil

this code is not working


Stretch image to whole page?

Posted: Wed Dec 11, 2013 8:55 am
by Kateryna Grynko

Hi Ketan,

Please post a public link and tell where to see this.