Strange behavior viewport width

(andrea galli) #1

Hi everybody!
I’m trying to fix out a problem about the viewport width of a web site that I’m developping with Hype.
The first step is to build up a fixed site that could be seen on PC and mobile devices in the same way…the next step is to create a specific layout for mobile devices.
What happens right now is this: I’ve placed the index file and the HTML5 folder in the root of my website and when I try to open the site from a mobile device (in this case an iPhone 6) I can see this:

while, if i put the index file and the HTML5 folder in a subfolder of my website, I can see something like this…that is exactly would like to achieve:

here are the parameters I set into Hype:

Document width
no Initial scale 1.0
yes allow user scaling

I tried also to set the Device width for the viewport (that should have more sense in this scenario), but nothing changed…

What I’m doing wrong?



It looks like your site is loaded in a frame, so your viewport setting is set as width=device-width

Can you load just the exported .html file here?

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "">
<title>annalisa matucci</title>
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="description" content="annalisa matucci pittrice | annalisa matucci paintress">
<meta name="keywords" content="annalisa matucci pittrice paintress quadri canvas arte art pittura">
<link rel="shortcut icon" type="image/x-icon" href="">
viewport = document.querySelector("meta[name=viewport]");
viewport.setAttribute('content', 'width=device-width, user-scalable=yes');
	<frameset rows="100%,*" cols="100%" frameborder="no" framespacing="0" border="0">
	<frame name="XYZZY2" scrolling="auto" src="" noresize>
	<frame name="XYZZY" scrolling="no" noresize>
		<h1><a href=""></a></h1>
		<p><a href="">Clicca qui</a> per vedere la versione senza frames.</p>

(andrea galli) #3

here you are Daniel: (7.4 KB)


(andrea galli) #4

I understood that this frame is caused by the web-provider because of the use of cloak!!
I manually edited the width of the viewport on that frame and set it to 1024, now I can see correctly the web site from the mobile devices!

can I also ask you if there is some incompatibility between chrome and random image Java script?!
I use a script like this:

<script language="JavaScript">

Random Image Script- By JavaScript Kit ( 
Over 400+ free JavaScripts here!
Keep this notice intact please

function random_imglink(){
var myimages=new Array()
//specify random images below. You can have as many as you wish

var ry=Math.floor(Math.random()*myimages.length)
if (ry==0)
document.write('<img src="'+myimages[ry]+'" border=0>')

<p align="center">This free script provided by<br />
<a href="">JavaScript

but the images are not loading on chrome…I can solve the problem creating a random image display (in the same scene) directly with Hype?!

(Jonathan Deutsch) #5

The script works for me in Chrome, at least as a standalone .html file or when using an HTML Widget in Hype. How are you including it?

My suggestion would be to look at the developer console and see if there are any specific errors.