Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

youi

macrumors newbie
Original poster
Sep 28, 2008
4
0
Hi, I am building an iphone optimized website and am confused about the actual size of the viewable area inside the mobile safari browser. The screen height is 480px but after subtracting the address bar at the top and the tool bar at the bottom, the view area goes down to 360px high.

However it is possible to make the upper address bar retract providing more space. I believe the lower tool bar always remains?

How do you make the address bar auto retract, and is this the way to go using the upper area of the screen, or should i stick to the reduced 360px within the browser. What are the pros and cons?

thanks
 

s01ipsist

macrumors newbie
Sep 28, 2008
1
0
Take a look at the
Safari Web Content Guide for iPhone OS
document.
Chapter 3, Configuring the Viewport
 

youi

macrumors newbie
Original poster
Sep 28, 2008
4
0
Hi, I had a look through 'Configuring the Viewport', but didn't see anything on making the URL text field retract. Is it available for websites, or just apps?

thanks
 

youi

macrumors newbie
Original poster
Sep 28, 2008
4
0
Anyone know how to make the URL address bar retract?
 

youi

macrumors newbie
Original poster
Sep 28, 2008
4
0
Got it, should have used the word 'hide' not 'retract' in my searching-

<script type="application/x-javascript">
function hideAddressBar() { window.scrollTo(0, 1); }
</script>

or

<script type="text/javascript" charset="utf-8">
addEventListener('load', function() {
setTimeout(hideAddressBar, 0);
}, false);
function hideAddressBar() {
window.scrollTo(0, 1);
}
</script>

or

http://iphonemicrosites.com/tutorials/how-to-hide-the-address-bar-in-mobilesafari/
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.