Toni Michel Caubet
Toni Michel Caubet

Reputation: 20163

iphone won't let user scale or scroll this website

I am wondering what am i missing here

this is the html

<head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <link rel="shortcut icon" href="../../nImg/favicon.ico" type="image/x-icon" />
        <title>Gran Melia</title>
        <meta name="Description" content="Gran Meliá"/>
        <meta name="Keywords" content="Gran Melia"/>
        <meta name="Language" content="es"/>
        <meta name="Robots" content="index,follow"/>
        <meta name="og:description" content="red" />
        <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>

        <!--<meta name="viewport" content="width=device-width"> 
         <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=0, minimum-scale=1.0, maximum-scale=1.0"> -->
        <!--<meta name="apple-mobile-web-app-capable" content="yes" />
        <meta name="apple-mobile-web-app-status-bar-style" content="black" /> -->

        <link href="css/960.css" rel="stylesheet" type="text/css" />
        <link href="css/css.css" rel="stylesheet" type="text/css" />
        <!--<link href="css/media.css" rel="stylesheet" type="text/css" />-->
        <!-- <link href="http://keepyourlinks.com/css/ui.css" rel="stylesheet" type="text/css" /> -->
        <script src="js/jquery.js" type="text/javascript"></script>
        <script src="js/js.js" type="text/javascript"></script>
            <!-- Fondo de galería -->
        <script src="js/graphics.js" type="text/javascript"></script>
        <script src='js/iscroll.js' type='text/javascript'></script> 
        <!--[if IE]>
            <script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
        <![endif]-->
        <script type="text/javascript">
            /*Fotos de fondo*/
            var photos = [
                "http://www.bancotravel.com/images/hoteles/M/MELIAPALACIOISORAALCALA/foto-hotel-23.jpg",
                "http://www.bancotravel.com/images/hoteles/M/MELIAPALACIOISORAALCALA/foto-hotel-24.jpg",
                "http://larivieramaya.es/wp-content/uploads/2011/04/sol-melia-prepara-el-lanzamiento-en-mexico-de-la-marca-paradisus-con-dos-hoteles-en-playa-del-carmen.jpg"
            ];
        </script>
    </head>

for what i can guess, i am commenting the lines (device-width) that should prevent this to happen so I am kind of lost...

In case this code is not enough, the testing website is http://toniweb.us/gm

-EDIT-

Won't let user scale or scroll even if:

<meta name="viewport" content="width=device-width, initial-scale=0.5, user-scalable=1, minimum-scale=0.5, maximum-scale=2.0">

Upvotes: 1

Views: 2961

Answers (2)

Tom van der Woerdt
Tom van der Woerdt

Reputation: 29975

<meta name="viewport" content="width=device-width"> 

That's the problem

<meta name="viewport" content="width=1024">

Should solve it

-edit-

Whoops, that site isn't 1024 pixels. Try experimenting with the value - maybe 320 (iPhone width)

-edit2-

Why would you want to let iPhone users scale the website anyway? If you design it for the right size, it's only annoying if they can scale...

Upvotes: 1

yunzen
yunzen

Reputation: 33439

I opt for this as the problem. If you have 100% height of body and html iphone is irritated.

html, body {
    height: 100%;
}

Upvotes: 1

Related Questions