So I created a site optimized to be rendered in a mobile device. I set the Width Site is looking good on Blackberry of my <DIV> tags to be about 300px, for the most part, to account for the reduced screen size. However, the IPhone Safari browser renders
this to the screen extremely small, and I can only assume that it's automatically reducing the size of the html accordingly to fit the device. Again, Blackberry does not do this.
Can anyone point me to a solution?
thanks
BlackberryiPhoneMobile Devicescreen render too small<DIV> tag
IMO, it’s better to add Viewport with DTD. It’s better to use both codes. In many places, I saw both DTD and Viewport. I used it and also recommend it.
None
0 Points
28 Posts
IPhone page shrinks html, but Blackberry doesn't
Dec 07, 2010 04:03 PM|captkirk35|LINK
So I created a site optimized to be rendered in a mobile device. I set the Width Site is looking good on Blackberry of my <DIV> tags to be about 300px, for the most part, to account for the reduced screen size. However, the IPhone Safari browser renders this to the screen extremely small, and I can only assume that it's automatically reducing the size of the html accordingly to fit the device. Again, Blackberry does not do this.
Can anyone point me to a solution?
thanks
Blackberry iPhone Mobile Device screen render too small <DIV> tag
None
0 Points
28 Posts
Re: IPhone page shrinks html, but Blackberry doesn't
Dec 07, 2010 04:13 PM|captkirk35|LINK
Here's the HTML in my Site.Master page:
<body bgcolor="White" style="left: 0px; top:0px; position: absolute;">
<div style="background-color: #FFFFFF; width: 300px; left: 0px; position: inherit;">
Thinking this may be the cause.
Star
14065 Points
3270 Posts
Re: IPhone page shrinks html, but Blackberry doesn't
Dec 07, 2010 10:24 PM|roopeshreddy|LINK
Hi,
You need to add a meta tag called "Viewport".
Check the following links,
http://roopeshreddy.wordpress.com/2010/07/25/mobile-development-in-asp-net/
http://roopeshreddy.wordpress.com/2010/10/25/developing-web-applications-for-blackberry-mobiles-using-microsoft-asp-net/
Hope it helps u.
Roopesh Reddy C
Roopesh's Space
None
0 Points
28 Posts
Re: IPhone page shrinks html, but Blackberry doesn't
Dec 07, 2010 10:28 PM|captkirk35|LINK
Added this DTD, and it seemed to do the trick
<!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.0//EN" "http://www.wapforum.org/DTD/xhtml-mobile10.dtd">
Do you think the Viewport is still needed?
Member
100 Points
37 Posts
Re: IPhone page shrinks html, but Blackberry doesn't
Dec 29, 2010 04:10 AM|David_ Charles|LINK
Hi,
IMO, it’s better to add Viewport with DTD. It’s better to use both codes. In many places, I saw both DTD and Viewport. I used it and also recommend it.
Star
14065 Points
3270 Posts
Re: IPhone page shrinks html, but Blackberry doesn't
Dec 29, 2010 10:22 AM|roopeshreddy|LINK
Hi,
Check the following link,
http://developer.apple.com/library/safari/#documentation/AppleApplications/Reference/SafariWebContent/Introduction/Introduction.html#//apple_ref/doc/uid/TP40002051
Hope it helps u...
Roopesh Reddy C
Roopesh's Space