andi
Posts: 0
Joined: Sat May 25, 2013 9:32 am

Stretch image to whole page?

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?

Alena Prykhodko
Posts: 0
Joined: Tue Apr 09, 2013 7:36 am

Stretch image to whole page?

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.

andi
Posts: 0
Joined: Sat May 25, 2013 9:32 am

Stretch image to whole page?

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

Illya Stepanov
Posts: 0
Joined: Mon Mar 18, 2013 8:48 am

Stretch image to whole page?

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.

Ketan Patil
Posts: 0
Joined: Tue Dec 03, 2013 1:10 pm

Stretch image to whole page?

this code is not working

Kateryna Grynko
Posts: 0
Joined: Thu Nov 15, 2012 9:13 am

Stretch image to whole page?

Hi Ketan,

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

Return to “Issues”