Displaying a mobile friendly webpage without the need for enlargement

I am trying to create a mobile friendly webpage using the following code. When I view it as desired by HTC, I need to zoom in to see the correct size. How can I make it display normally without zooming?

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="MobileSite._Default" %>


<!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.2//EN" "http://www.openmobilealliance.org/tech/DTD/xhtml-mobile12.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >

<head runat="server">
    <title>My Mobile Site</title>
</head>
<body style="width: 480px">
    <form id="form" runat="server">
    <div>    
        Test<br />
        Test<br />
        Test
    </div>
    </form>
</body>
</html>
+3
source share
2 answers

I'm not sure if HTC supports the browsing meta tag just like the iPhone, but you can try:

<meta name="viewport" content="width = 320" />

(or some other width) or:

<meta name="viewport" content="initial-scale=1" />
+7
source

AFAIK webkit viewport. div doctype,

0

Source: https://habr.com/ru/post/1743094/


All Articles