Asked by:
IPhone page shrinks html, but Blackberry doesn't

Question
-
User742899572 posted
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
Tuesday, December 7, 2010 4:03 PM
All replies
-
User742899572 posted
Here's the HTML in my Site.Master page:
<body bgcolor="White" style="left: 0px; top:0px; ;">
<div style="background-color: #FFFFFF; width: 300px; left: 0px; ;">
Thinking this may be the cause.
Tuesday, December 7, 2010 4:13 PM -
User1943143334 posted
Hi,
You need to add a meta tag called "Viewport".
<meta name="viewport" content="width=device-width;initial-scale=1.0;maximum-scale=5.0;" />
Check the following links,
http://roopeshreddy.wordpress.com/2010/07/25/mobile-development-in-asp-net/
Hope it helps u.
Tuesday, December 7, 2010 10:24 PM -
User742899572 posted
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?
Tuesday, December 7, 2010 10:28 PM -
User-333223682 posted
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.
Wednesday, December 29, 2010 4:10 AM -
User1943143334 posted
Hi,
Check the following link,
Hope it helps u...
Wednesday, December 29, 2010 10:22 AM