views:

176

answers:

2

Hello, anone knows how to remove the bar at the top and bottom on safari iphone. I have this mobile web page am writing and I cannot get rid of the navigation bar. Is that even possible ?

Thanks.

+1  A: 

You can't remove the bars from the top and bottom of the Safari app. I've seen apps that embed Safari in them without the two bars, but you couldn't do this using Javascript or a metadata tag in your page.

UPDATE

There is trick that lets you hide the address bar by scrolling the page. Something like this:

<script type="application/x-javascript">
    addEventListener("load", function() { setTimeout(hideURLbar, 0); }, false);

    function hideURLbar(){
        window.scrollTo(0,1);
    }
</script>
Am
Thanks, I can remove the top bar but the navigation bar is a nono :-( . Thanks anyways,
I just updated my reply.
Am
Thanks the top bar removal works better than mine.
glad to help with a question
Am
+1  A: 

You can include <meta name="apple-mobile-web-app-capable" content="yes" /> in the header. This will remove the two bars when the app is bookmarked on the springboard.

If you want to remove the top bar in mobile Safari, use the code Am posted.

Rengers
Thanks I added that as well. Unfortunately there is no way to get rid of that navigation bar when the app is not bookmarked :(