Mobile Document Type Definition
Asked Answered
S

1

14

Mobile site is not showing correctly. I have to zoom in to view my site correctly even if I have the correct DTD:

<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.2//EN" 
"http://www.wapforum.org/DTD/xhtml-mobile12.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>MySite Mobile</title>
<link rel="stylesheet" type="text/css" href="mobile.css"/>
</head>
<body>
<!-- content -->
</body>
</html>

Do I have the correct DTD?

Schuyler answered 3/10, 2011 at 14:23 Comment(0)
S
22

You are missing the viewport meta tag.

<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">

view this link https://developer.mozilla.org/en/Mobile/Viewport_meta_tag

Stanford answered 3/10, 2011 at 16:57 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.