steve5588065
Posts: 0
Joined: Tue Feb 26, 2013 6:36 am

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

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

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

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

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');

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

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

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

steve5588065
Posts: 0
Joined: Tue Feb 26, 2013 6:36 am

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

Hi Marina

Here is the Public Link

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

regards
Steve

steve5588065
Posts: 0
Joined: Tue Feb 26, 2013 6:36 am

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

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

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

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

Thank you. Add one more line to your code

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

steve5588065
Posts: 0
Joined: Tue Feb 26, 2013 6:36 am

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

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

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

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

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

steve5588065
Posts: 0
Joined: Tue Feb 26, 2013 6:36 am

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

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

Most screens display better in Landscape mode

steve5588065
Posts: 0
Joined: Tue Feb 26, 2013 6:36 am

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

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

Return to “Issues”