NetTalk Central

Author Topic: How do I shorten the Width on all my screens for Handheld devices?  (Read 2957 times)

britech

  • Jr. Member
  • **
  • Posts: 57
    • View Profile
Hi Folks,

I'm  just starting to figure out that the look and feel of Nettalk apps is really tied up in the style sheets.
New territory for me.
Are there any quick tips for editing the style sheets (presumably netweb.css) so that I can get much narrower screens for a handheld?
Any suggestions welcomed.
Thanks,
Brian
NT5 PR26
6.3 9055

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: How do I shorten the Width on all my screens for Handheld devices?
« Reply #1 on: August 24, 2010, 10:12:56 AM »
One tip is to put the following in the WebHandler procedure, ProcessLink method, before the parent call;

  If self.mobile
    self.site.HtmlCommonStyles = clip(self.site.HtmlCommonStyles) & self.AddStyle('mymobile.css')
    self.MetaHeaders = '<meta name="viewport" content="user-scalable=no, width=device-width" />'
  end

self.mobile is = 1 if the device is a mobile device. you can use this elsewhere as well. The mymobile.css is a file of yours, containing styles etc for mobile devices.

There's a lot more mobile stuff coming, but these are hints in the right direction.

Cheers
Bruce

britech

  • Jr. Member
  • **
  • Posts: 57
    • View Profile
Re: How do I shorten the Width on all my screens for Handheld devices?
« Reply #2 on: August 24, 2010, 12:32:09 PM »
Thanks Bruce,
I'll try this.
Brian
NT5 PR26
6.3 9055