Last post Dec 29, 2010 10:22 AM by roopeshreddy
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?
screen render too small
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.
Dec 07, 2010 10:24 PM|roopeshreddy|LINK
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,
Hope it helps u.
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?
Dec 29, 2010 04:10 AM|David_ Charles|LINK
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.
Dec 29, 2010 10:22 AM|roopeshreddy|LINK
Check the following link,
Hope it helps u...