Titanium Community Questions & Answer Archive

We felt that 6+ years of knowledge should not die so this is the Titanium Community Questions & Answer Archive

Positioning WebView content

Having made a nice WebView and imported some HTML into it, I find a nasty white margin at the top and left as my customer hasn't set his body tag margin to zero. It's being used for his website so he's unlikely to want to change it either.

So is there any way to offset this inside a WebView? Looking at the API I can't see that there is - which is rather disappointing.

I did try and do it with DOM methods but can't seem to be able to access the content inside the WebView. Obviously not my day!

— asked November 24th 2010 by Patrick Mounteney
  • iphone
  • webview
0 Comments

1 Answer

  • Are you just loading a remote URL into the webview? Or are you creating the content and posting it (rendered from local code)? If you're pulling it remotely, there isnt anything you can do, the webview is just a container.

    — answered November 24th 2010 by Josh Lewis
    permalink
    1 Comment
    • Josh - it's coming off a webserver. I was rather thinking I was probably stuffed on this one. I'll have to get them to clone the PHP script and change it on the server. Thanks anyway.

      — commented November 24th 2010 by Patrick Mounteney
The ownership of individual contributions to this community generated content is retained by the authors of their contributions.
All trademarks remain the property of the respective owner.