Page 1 of 2

Unable get an input type=text to center on the screen

Posted: Thu Feb 28, 2013 4:23 am
by steve5588065

I have numerous buttons images etc on my screen.

In load event I run javascript to center all the controls

All works great except for the input control. It will not center

''javascript. Note this works on ALL the other components
'txtstaticip' is the name of the input

Tiggzi('txtstaticip').css('margin-left', 'auto');
Tiggzi('txtstaticip').css('margin-right', 'auto');
Tiggzi('txtstaticip').css('align', 'center');
Tiggzi('txtstaticip').css('width', '200px');

can you tell me what I am missing

Regards
Steve


Unable get an input type=text to center on the screen

Posted: Thu Feb 28, 2013 6:48 am
by Maryna Brodina

Hello! It works for me

Image

Tiggzi('mobiletextinput1_3').css('margin-left', 'auto');
Tiggzi('mobiletextinput1_3').css('margin-right', 'auto');
Tiggzi('mobiletextinput1_3').css('align', 'center');
Tiggzi('mobiletextinput1_3').css('width', '200px');


Unable get an input type=text to center on the screen

Posted: Thu Feb 28, 2013 6:58 am
by Maryna Brodina

Could you post your public app link (Test, check public)


Unable get an input type=text to center on the screen

Posted: Thu Feb 28, 2013 7:12 am
by steve5588065

Hi Marina

Here is the Public Link

http://project.tiggzi.com/mobile-fram...

regards
Steve


Unable get an input type=text to center on the screen

Posted: Thu Feb 28, 2013 7:32 am
by steve5588065

Marina

One other issue

My APP opens in Landscape on my Ipad and covers the full screen.

I then click on either of the buttons to launch my web in the phonegap childbrowser

When I click the done button to go back to the APP, it is still in Landscape mode but only the width of Portrait view.
i.e the APP screen is only approx 3/4 of the width of the ipad screen

Regards
Steve


Unable get an input type=text to center on the screen

Posted: Thu Feb 28, 2013 8:07 am
by Maryna Brodina

Thank you. Add one more line to your code

Tiggzi('txtstaticip').parent().css('text-align', 'center');


Unable get an input type=text to center on the screen

Posted: Thu Feb 28, 2013 8:22 am
by steve5588065

Hi Marina

Thanks so much for fixing the input centering

Much appreciated. It was driving me crazy

Slowly getting the hang of Tiggzi now and love it

regards
Steve


Unable get an input type=text to center on the screen

Posted: Thu Feb 28, 2013 11:59 am
by Maryna Brodina

Does your app work only in Landscape mode - when you rotate the screen does it change orientation?


Unable get an input type=text to center on the screen

Posted: Thu Feb 28, 2013 10:08 pm
by steve5588065

It works only in Landscape mode.
I selected Landscape left and right in UISupportedInterfaceOrientations in IOS Keys.

Most screens display better in Landscape mode


Unable get an input type=text to center on the screen

Posted: Fri Mar 01, 2013 7:49 am
by steve5588065

Further to this

I temporarily set all options in ios keys for orientation
Now when childbrowser closes the app is still in portrait width on landscape view but if I rotate the Ipad to portrait then back to landscape the app goes full screen again

regards
Steve