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?

Tech4Wilco
  • 6,740
  • 5
  • 46
  • 81

1 Answers1

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

Pat R Ellery
  • 1,696
  • 3
  • 22
  • 40