views:

449

answers:

3

I've tried numerous methods to get a static header on a UIWebView so that it only scrolls the content below a html header. Has anyone successfully accomplished this?

A: 

I'm looking for essentially the same thing... You can do it for a div, but then the div needs to be scrolled using 2 fingers....

see this discussion on StackOverflow for more info

Brad

Brad Parks
A: 

The CSS standards specify a position: fixed property to do this, but WebKit on the iPhone doesn't support it. (I don't have any inside information on this, but I suspect it's because there's no sensible way to support zoom with it.) So if you want to do this, you'll have to do it from outside the webview, by (for example) putting a second webview above the first with the static header.

Brent Royal-Gordon
A: 

If this needs to work only on the phone, you could just place two UIWebViews, one above the other. Display the header in one, and the content in another.

Marvin