Page 1 of 1
how to set width, height for input component,buttons?
Posted: Thu Apr 03, 2014 6:05 am
by navya kodali
Hi,
i want to set width for an input component.
how to do that?
i have adjusted input component margin left,right values. but its not properly viewed in other orientations and other screen sizes.
please guide me...
how to set width, height for input component,buttons?
Posted: Thu Apr 03, 2014 7:16 am
by Kateryna Grynko
Hi Navya,
You can use this CSS: pre[name=labelName]{
width: 100px;
height:100px;
}/pre
Or the following JS:preAppery("labelName").css("width", "100px");
Appery("labelName").css("height", "100px");/preWhere 'labelName' is a name of a Label component.
how to set width, height for input component,buttons?
Posted: Thu Apr 03, 2014 7:29 am
by navya kodali
thanks for your reply...
on which event i have to write this code.
if i use this code may i get component center of the page irrespective of the screen size.for 320x480,768x1024 and 768x1024
how to set width, height for input component,buttons?
Posted: Thu Apr 03, 2014 8:40 am
by Kateryna Grynko
Navya,
If you want to use CSS, you would need to create custom CSS code.
If you choose JavaScript, run the code on page Load event.
how to set width, height for input component,buttons?
Posted: Thu Apr 03, 2014 10:07 am
by navya kodali
if i use this code may i get component center of the page irrespective of the screen size.for 320x480,768x1024 and 768x1024
how to place a component center of the screen with dome dimensions?
how to set width, height for input component,buttons?
Posted: Thu Apr 03, 2014 1:41 pm
by Kateryna Grynko
Navya,
This code is to align horizontally:preAppery('labelName').css('margin-left', 'auto');
Appery('labelName').css('margin-right', 'auto');
Appery('labelName').css('align', 'center');
Appery('labelName').css('width', '100px');/pre
To align vertically add the following custom code:prejQuery.fn.verticalAlign = function ()
{
return this
.css("margin-top",($(this).parent()
.height() - $(this).height())/2 + 'px' )
};/preThen on Page Show event run:preAppery("labelName").verticalAlign();/pre
how to set width, height for input component,buttons?
Posted: Mon Sep 08, 2014 8:02 pm
by Joe Sharples
I used the initial code to change the height which worked, although the text is in the centre, how can i change this so it's at the top?
how to set width, height for input component,buttons?
Posted: Mon Sep 08, 2014 9:09 pm
by Kateryna Grynko
Hi Joe,
Please use Textarea component instead of Input to enable multi-line text.
how to set width, height for input component,buttons?
Posted: Mon Sep 08, 2014 9:47 pm
by Joe Sharples
I feel extremely stupid now, that is obviously the better component to use.
Thank you.
how to set width, height for input component,buttons?
Posted: Sat Nov 22, 2014 2:13 am
by EJLD
basic but still helpful. thks