pritu patel
Posts: 0
Joined: Tue Jan 21, 2014 6:24 am

how to change size of element according to screen size

When i change screen size the search input and button had some problem.
see following screenshot
Image
What is the solution for this.???
i used for carousel following code for change size
Appery("carouselimage").css("height","100%");
Appery("carouselimage").css("width","100%");

this code not working on searchbox and button.
Any mistake in that??

pritu patel
Posts: 0
Joined: Tue Jan 21, 2014 6:24 am

how to change size of element according to screen size

I got solution.
I change it using height:auto and width:100%

pritu patel
Posts: 0
Joined: Tue Jan 21, 2014 6:24 am

how to change size of element according to screen size

I want to change height of the carousel according to screen size.
I fix height of carousel 180.i can't put in that 100%.
When i change height it will display small.
How to change it???

Maryna Brodina
Posts: 0
Joined: Thu Apr 05, 2012 7:27 am

how to change size of element according to screen size

Change it on Page show event using JS.

pritu patel
Posts: 0
Joined: Tue Jan 21, 2014 6:24 am

how to change size of element according to screen size

I know but when I open in small screen it display very big.
and when i open in samll screen it disaply very small.
What is the code that manage in both screen perfectly.

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

how to change size of element according to screen size

What code do you run?

pritu patel
Posts: 0
Joined: Tue Jan 21, 2014 6:24 am

how to change size of element according to screen size

Appery("carouselimage").css("height","100%");
Appery("carouselimage").css("width","100%");

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

how to change size of element according to screen size

If you want calculate height in accordance to the screen size you can the use next code:
pre

var documentHeight = jQuery(document).height();
var documentWidth = jQuery(document).width();

//Calculate carousel height according to documentHeight and some logic.
var goalHeight = documentHeight - 200;

Appery("carouselimage").css("height", goalHeight + "px");/pre

Actually custom code is out of scope of our support, as it's up to your app logic you can search more on-line.

pritu patel
Posts: 0
Joined: Tue Jan 21, 2014 6:24 am

how to change size of element according to screen size

Thank you Alena!!! You are great...
I follow your above suggestion.
And finally I can change height of my carousel according to screen height....

please give following solution to other person that I used on carousel.
It's successfully worked.

var documentHeight = jQuery(document).height();
alert(documentHeight);
var goalHeight=(documentHeight)*(35)/100;
alert(goalHeight);
$("#upcome_mobilecarousel").attr('style', 'height:'+goalHeight+'px !important');

I used this to change my carousel height...
Thank you again,
Alena.

Ellen Schlechter
Posts: 0
Joined: Sun Aug 31, 2014 3:28 am

how to change size of element according to screen size

I too want to change the size of a select menu. The default height is fine but I want to change the width so that it looks proportional on every screen size. I assume I should do this with a percentage? I tried using Appery("carouselimage").css("width","100%"); and changing it to 10% but it didn't work. It instead wouldn't let me click on the select menu.

Return to “Issues”