Page 1 of 3

How do I set the proportions of my home page's grids in percentage?

Posted: Fri Dec 20, 2013 7:33 pm
by marieall

Until now i set them in pixels, based on a 320x480 pixels page, but I'm testing on a different screen size (an Android phone) than my default page size, and it's not adapting ...

Image Image


How do I set the proportions of my home page's grids in percentage?

Posted: Fri Dec 20, 2013 8:33 pm
by Kateryna Grynko

Hi Marie,

Instead of pixels, you can use percent or vh (vw):
http://dev.w3.org/csswg/css-values-3/...
http://dev.opera.com/articles/view/cs...


How do I set the proportions of my home page's grids in percentage?

Posted: Fri Jan 03, 2014 4:45 pm
by marieall

Hi Katya,

The apperio interface doesn't want vh values.
As for the percentage, I tried, it works for the width, but not for the heigth... (see screenshot) Any ideas?

Image


How do I set the proportions of my home page's grids in percentage?

Posted: Fri Jan 03, 2014 5:48 pm
by Kateryna Grynko

Hi Marie,

Add custom CSS for this component:pre[name=component]{
height: 100vh;
}/preWhere 'component' is a component name.


How do I set the proportions of my home page's grids in percentage?

Posted: Sat Jan 04, 2014 2:17 pm
by marieall

Thank you it works! :)


How do I set the proportions of my home page's grids in percentage?

Posted: Sat Jan 04, 2014 9:50 pm
by marieall

Hi Again,

It actually just works on the simulator, but not on an Android phone...
It doesn't take into account my css... though it does on the simulator.


How do I set the proportions of my home page's grids in percentage?

Posted: Sat Jan 04, 2014 9:54 pm
by Igor

Hi,

Are there any errors in browser console? What Android version are you using for testing?


How do I set the proportions of my home page's grids in percentage?

Posted: Tue Jan 07, 2014 2:16 pm
by marieall

Hi,

I tested on a Samsung phone with android version 4.2.2 and it didn't work. It takes into account the css from the UI (where i set the width) but not the css i added in the css file
then I tested on Nexus 5 with the android version 4.4 and it worked perfectly.


How do I set the proportions of my home page's grids in percentage?

Posted: Tue Jan 07, 2014 8:10 pm
by Illya Stepanov

Hi -- can you share your app with a href="mailto:support@appery.io" rel="nofollow"support@appery.io/a or give us a public link, we'll test it on a device?


How do I set the proportions of my home page's grids in percentage?

Posted: Thu Jan 09, 2014 8:58 am
by Kateryna Grynko

Hi Marie,

This works for us. Let's try setting size using pixels and JS. Fit 'component' to Screen size:prevar screenH = Appery("Screen").height();
Appery("component").css("height", screenH);/pre