Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Mobile Document Type Definition

Tags:

mobile

dtd

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?

like image 464
Tech4Wilco Avatar asked Oct 03 '11 14:10

Tech4Wilco


1 Answers

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

like image 65
Pat R Ellery Avatar answered Oct 13 '22 21:10

Pat R Ellery