NetTalk Central
NetTalk Web Server => Web Server - Ask For Help => Topic started by: DonRidley on August 18, 2012, 12:04:08 PM
-
Hello Bruce,
This is hard to explain..
In a login form (modified version of the shipped example), in mobile mode, the header changes when I click on the password field. The header appears to change position and/or width.
If I remove this 'nt-fix-center cus-width-300', the problem goes away but now my login form is not centered all nice and pretty in desktop mode.
This started happening several builds ago. Don't know for sure which one.
I wish I had a way to screen capture on my Android phone. This behavior does not happen in mobile mode on a desktop browser.
Anyway, I hope someone else tests this and can duplicate it.
Thanks,
Don
[attachment deleted by admin]
-
the centering css requires that you know the width of the form, and I would definitely recommend removing it in mobile mode.
>> If I remove this 'nt-fix-center cus-width-300', the problem goes away but now my login form is not centered all nice and pretty in desktop mode.
so make the CSS conditional on being in Desktop mode. CHOOSE is your friend, as is p_web.IsMobile().
Cheers
Bruce
-
Awesome! Thanks Bruce!
-
I got it working just after we ended our Skype conversation.
It was missing 'px' after the 300.
This works:
CHOOSE(p_web.IsMobile(),'',' nt-fix-center nt-width-300px')
I don't think "p_web.IsMobile = 1" is required . I think CHOOSE evaluates that as either true or false automatically.
Thanks for the help!!!
Don
-
you don't need the =1 if the function returns a number. However if it returns a string you can get unexpected results, so I always encourage using a complete expression when using Choose. It's a good habit to get into.
For example;
if the function returns a blank string then
Choose(func(),1,2)
and
Choose(func() = '',1,2)
will return different values.
Cheers
Bruce