2017-09-12 1 views
-1

J'ai codé en HTML depuis plusieurs années et c'est la première fois que je dois rendre mon site mobile. J'ai regardé mobile amical en ligne et ai essayé chaque suggestion mais toujours rien ne fait fonctionner le site mobile. Je n'ai créé qu'environ 6 pages pour mobile à ce moment-là, de sorte que l'ensemble du site n'est pas disponible pour mobile pour le moment. Lorsque vous chargez le site mobile en entrant le nom M.pagename.html directement dans la barre de recherche, il se charge correctement, mais lorsque vous entrez le nom de page du bureau sur un périphérique mobile, il doit afficher le nom m.page, mais il ne le fait pas. pas ça amène la page de bureau. Je suis sûr que c'est quelque chose que je ne fais pas correctement et quelqu'un avec beaucoup plus d'expérience avec les sites mobiles peut regarder et réparer très facilement. Je suis prêt à essayer tout ce qui va faire ce travail.J'ai besoin d'aide pour rendre mon site Web mobile, j'ai essayé toutes les suggestions que je peux trouver et rien ne fonctionne

Toute aide serait grandement appréciée.

page Web Desktop index.html l'exemple de page Web mobile est en dessous de cet exemple

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
<html xmlns="http://www.w3.org/1999/xhtml"> 
<head> 
<!-- Google Tag Manager --> 
<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start': 
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0], 
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src= 
'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f); 
})(window,document,'script','dataLayer','GTM-N3SCXB6');</script> 
<!-- End Google Tag Manager --> 
<meta name="keywords" content="Amigo, Vape, e Cig, Atomizer, Mod, Low Priced Vape, Cheap Vape, Discount Vape, Vape Deals, Ultimate Vape Deals, Vape 101, Your Vape, Vape World, Vape cart, Smok, Wismec, Itsuwa" /> 
<meta name="description" content="We specialize in the distribution of vape kits from the starter kit to the professional kit, including coils, Mods, Atomizer, e Cigarette, parts." /> 
<meta name="robots" content="index, follow"> 
<meta name="msvalidate.01" content="F7D5EB809B0143B3230091FECC3E6E56" /> 
<meta name="google-site-verification" content="Y_qBasS5tQhExv6mwMA90_Ge12-jY4D_xpz7k3mYeBY" /> 
<meta name="revisit-after" content="15 days"> 
<link rel="alternate" media="only screen and (max-width: 320px)" href="M.index.html"> 
<meta name="viewport" content="width=device-width, initial-scale=1.0"> 
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /> 
<meta http-equiv="content-language" content="en-us"> 
<title>Low Priced Vape - Amigo, Vape, e Cigarette, Atomizer, Mod</title> 
<!-- Amigo, Vape, e Cig --> 
<style type="text/css"> 
<!-- 
#Layer1 { 
    position:absolute; 
    width:131px; 
    height:60px; 
    z-index:1; 
    left:0px; 
    top:221px; 
} 
#Layer2 { 
    position:absolute; 
    width:131px; 
    height:60px; 
    z-index:2; 
    left:0px; 
    top:281px; 
} 
#Layer3 { 
    position:absolute; 
    width:131px; 
    height:60px; 
    z-index:3; 
    left:0px; 
    top:341px; 
} 
#Layer21 { 
    position:absolute; 
    width: 1300px; 
    height: 220px; 
    z-index:21; 
    left:0px; 
    top:0px; 
} 
#Layer22 { 
    position:absolute; 
    width:46px; 
    height:347px; 
    z-index:22; 
    left:1254px; 
    top:221px; 
} 
#Layer33 { 
    position: absolute; 
    width: 1090px; 
    height: 325px; 
    z-index: 33; 
    left: 145px; 
    top: 228px; 
    font-family: Arial; 
    font-size: 18px; 
    text-align: center; 
    margin: 0px; 
    padding: 0px; 
    border: medium solid #00F; 
} 
#Layer80 { 
    position: absolute; 
    width: 524px; 
    height: 60px; 
    z-index: 80; 
    left:458px; 
    top:745px; 
    } 
.style2 { 
    font-family: Geneva, Arial, Helvetica, sans-serif; 
    color: #FFFFFF; 
    font-size: 12px; 
} 
.style3 { 
    font-size: 14px; 
    font-weight: bold; 
} 
body { 
    background-color: #3777A3; 
    font-family: Arial, Helvetica, sans-serif; 
    font-size: 12px; 
    font-style: normal; 
    font-weight: normal; 
    color: #FFF; 
} 
--> 
</style> 

<script type="text/JavaScript"> 
<!-- 
function MM_preloadImages() { //v3.0 
    var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array(); 
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++) 
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}} 
} 

function MM_swapImgRestore() { //v3.0 
    var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc; 
} 

function MM_findObj(n, d) { //v4.01 
    var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) { 
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);} 
    if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n]; 
    for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document); 
    if(!x && d.getElementById) x=d.getElementById(n); return x; 
} 

function MM_swapImage() { //v3.0 
    var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3) 
    if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];} 
} 
//--> 
</script> 
<script> 
    (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ 
    (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), 
    m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) 
    })(window,document,'script','https://www.google-analytics.com/analytics.js','ga'); 

    ga('create', 'UA-96730073-2', 'auto'); 
    ga('send', 'pageview'); 

</script> 
<link rel="alternate" media="only screen and (max-width: 320px)" href="M.index.html"> 
</head> 

<body onload="MM_preloadImages('images/HomeB.jpg','images/AboutB.jpg','images/vapeB.jpg')"> 
<!-- Google Tag Manager (noscript) --> 
<noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-N3SCXB6" 
height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript> 
<!-- End Google Tag Manager (noscript) --> 
<link rel="alternate" media="only screen and (max-width: 320px)" href="M.index.html"> 
<h1>Amigo, Vape, e Cig, Atomizer, Mod, Low Priced Vape, Cheap Vape, Discount Vape, Vape Deals, Ultimate Vape Deals, Vape 101, Your Vape, Vape World, Vape cart, Smok, Wismec, Itsuwa</h1> 
<div id="Layer21"><img src="images/LP.gif" width="1300" height="220" alt="Vape" /></div> 
<div id="Layer1"><a href="index.html"><img src="images/HomeA.jpg" alt="Home" width="131" height="60" border="0" id="Image1" onmouseover="MM_swapImage('Image1','','images/HomeB.jpg',1)" onmouseout="MM_swapImgRestore()" /></a></div> 
<div id="Layer2"><a href="Vape.html"><img src="images/VapeA.jpg" alt="Vape" width="131" height="60" border="0" id="Image2" onmouseover="MM_swapImage('Image2','','images/vapeB.jpg',2)" onmouseout="MM_swapImgRestore()" /></a></div> 
<div id="Layer3"><a href="About.html"><img src="images/AboutA.jpg" alt="About" width="131" height="60" border="0" id="Image3" onmouseover="MM_swapImage('Image3','','images/AboutB.jpg',3)" onmouseout="MM_swapImgRestore()" /></a></div> 
<div id="Layer22"><img src="images/Welcome.jpg" alt="Welcome" width="46" height="347" /></div> 
<div id="Layer33" align="center"><p><font size="+2" face="Courier New, Courier, monospace">We have over 30 years combined marketing experience. We have operated several businesses over this period and are dedicated to customer satisfaction. Our current business specializes in the vaping industry and we represent some of the largest vaping e-cigarette companies. If you need, more information please send us a request and we will reply within 24 hours.</font></p><p><a href="Contact.php"><center><font size="+2" face="Courier New, Courier, monospace" color="#FFFFFF">Click here to contact Us.</font></center></a></p><p>&nbsp;</p><a href="http://www.hitwebcounter.com" target="_blank"><img src="http://hitwebcounter.com/counter/counter.php?page=6636199&style=0005&nbdigits=5&type=page&initCount=5000" title="Counter" Alt="Counter" border="0" ></a></div> 
<div id="Layer80">This site built and maintained by <a style="text-decoration: underline;" href="http://www.lowpricedvape.com"><font color="#FFFFFF">www.lowpricedvape.com</font></a><br /> <font color="#3999A9"> Amigo, Vape, e Cig, Atomizer, Mod, Low Priced Vape, Cheap Vape, Discount Vape, Vape Deals, Ultimate Vape Deals, Vape 101, Your Vape, Vape World, Vape cart, Smok, Wismec, Itsuwa</font></div> 
</body> 
</html> 

page Web mobile www.lowpricedvape.com/M.index.html

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
<html xmlns="http://www.w3.org/1999/xhtml"> 
<head> 
<!-- Google Tag Manager --> 
<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start': 
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0], 
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src= 
'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f); 
})(window,document,'script','dataLayer','GTM-N3SCXB6');</script> 
<!-- End Google Tag Manager --> 
<meta name="keywords" content="Amigo, Vape, e Cig, Atomizer, Mod, Low Priced Vape, Cheap Vape, Discount Vape, Vape Deals, Ultimate Vape Deals, Vape 101, Your Vape, Vape World, Vape cart, Smok, Wismec, Itsuwa" /> 
<meta name="description" content="We specialize in the distribution of vape kits from the starter kit to the professional kit, including coils, Mods, Atomizer, e Cigarette, parts." /> 
<meta name="robots" content="index, follow"> 
<meta name="msvalidate.01" content="F7D5EB809B0143B3230091FECC3E6E56" /> 
<meta name="google-site-verification" content="Y_qBasS5tQhExv6mwMA90_Ge12-jY4D_xpz7k3mYeBY" /> 
<meta name="revisit-after" content="15 days"> 
<meta name="viewport" content="width=device-width, initial-scale=1.0"> 
<link rel="canonical" href="index.html"> 
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> 
<meta http-equiv="content-language" content="en-us"> 
<title>Low Priced Vape - Amigo, Vape, e Cigarette, Atomizer, Mod</title> 
<style type="text/css"> 
<meta charset="utf-8"> 

<!-- 
#Layer1 { 
    position:absolute; 
    width:1px; 
    height:1px; 
    z-index:4; 
    left:1px; 
    top:1px; 
} 
#Layer1 { 
    position:absolute; 
    width:100px; 
    height:46px; 
    z-index:1; 
    left:0px; 
    top:121px; 
} 
#Layer2 { 
    position:absolute; 
    width:100px; 
    height:46px; 
    z-index:2; 
    left:0px; 
    top:167px; 
} 
#Layer3 { 
    position:absolute; 
    width:100px; 
    height:46px; 
    z-index:3; 
    left:0px; 
    top:213px; 
} 
#Layer4 { 
    position:absolute; 
    width:1px; 
    height:1px; 
    z-index:4; 
    left:1px; 
    top:1px; 
} 
    #Layer7 { 
    position:absolute; 
    width:100px; 
    height:92px; 
    z-index:7; 
    left:0px; 
    top:259px; 
} 
#Layer21 { 
    position: absolute; 
    width: 320px; 
    height: 120px; 
    z-index: 21; 
    left: 0px; 
    top: 1px; 
} 
#Layer30 { 
    position: absolute; 
    width: 220px; 
    height: 220px; 
    z-index: 30; 
    left: 101px; 
    top: 123px; 
} 
#Layer41 { 
    position: absolute; 
    width: 217px; 
    height: 110px; 
    z-index: 41; 
    left: 101px; 
    top: 341px; 
} 
    #Layer42 { 
    position: absolute; 
    width: 215px; 
    height: 430px; 
    z-index: 42; 
    left: 101px; 
    top: 123px; 
    font-family: Arial; 
    font-size: 18px; 
    text-align: center; 
    margin: 0px; 
    padding: 0px; 
    border: medium solid #00F; 
} 
    #Layer43 { 
    position: absolute; 
    width: 315px; 
    height: 145px; 
    z-index: 43; 
    left: 0px; 
    top: 745px; 
    font-family: Arial; 
    font-size: 18px; 
    text-align: center; 
    margin: 0px; 
    padding: 0px; 
    border: medium solid #00F; 
} 
#Layer65 { 
    position: absolute; 
    width: 220px; 
    height: 30px; 
    z-index: 65; 
    left: 101px; 
    top: 463px; 
} 
#Layer66 { 
    position: absolute; 
    width: 220px; 
    height: 30px; 
    z-index: 66; 
    left: 101px; 
    top: 498px; 
} 
#Layer80 { 
    position: absolute; 
    width: 320px; 
    height: 100px; 
    z-index: 80; 
    left: 0px; 
    top: 760px; 
} 
.style2 { 
    font-family: Geneva, Arial, Helvetica, sans-serif; 
    color: #FFFFFF; 
    font-size: 18px; 
} 
.style3 { 
    font-size: 14px; 
    font-weight: bold; 
} 
body { 
    background-color: #3777A3; 
    font-family: Arial, Helvetica, sans-serif; 
    font-size: 12px; 
    font-style: normal; 
    font-weight: normal; 
    color: #FFF; 
} 
--> 
</style> 

<script type="text/JavaScript"> 
<!-- 
function MM_findObj(n, d) { //v4.01 
    var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) { 
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);} 
    if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n]; 
    for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document); 
    if(!x && d.getElementById) x=d.getElementById(n); return x; 
} 
//--> 
</script> 
<script> 
    (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ 
    (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), 
    m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) 
    })(window,document,'script','https://www.google-analytics.com/analytics.js','ga'); 

    ga('create', 'UA-96730073-2', 'auto'); 
    ga('send', 'pageview'); 

</script> 
<link rel="canonical" href="index.html"> 
</head> 
<body> 
<!-- Google Tag Manager (noscript) --> 
<noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-N3SCXB6" 
height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript> 
<!-- End Google Tag Manager (noscript) --> 
<link rel="canonical" href="index.html"> 
<div id="Layer4"></div> 
<div id="Layer1"><a href="M.index.html"><img src="images/HomeA.jpg" alt="Vape" width="100" height="46" border="0" id="Image1" /></a></div> 
<div id="Layer2"><a href="M.Vape.html"><img src="images/VapeA.jpg" alt="Vape" width="100" height="46" border="0" id="Image2" /></a></div> 
<div id="Layer3"><a href="M.About.html"><img src="images/AboutA.jpg" alt="About" width="100" height="46" border="0" id="Image3" /></a></div> 
<div id="Layer7"><a href="http://Shop.lowpricedvape.com" target="_blank"><img src="images/ShopA.jpg" alt="Shop" width="100" height="92" border="0" id="Image7" /></a></div> 
<div id="Layer21"><img src="images/MHeader.jpg" alt="Vape" width="320" height="120"/></div> 
<div id="Layer42" style="border: solid; color: navy" align="center"><font color="#FFFFFF" size="+1">We have over 30 years combined marketing experience. We have operated several businesses over this period and are dedicated to customer satisfaction. Our current business specializes in the vaping industry and we represent some of the largest vaping e-cigarette companies. If you need, more information please send us a request and we will reply within 24 hours.</font><br><p><a href="M.Contact.php"><font color="#FFFFFF" size= "+2">Click here to contact Us.</font></a></p></div> 
<div id="Layer80">This site built and maintained by <a style="text-decoration: underline;" href="http://www.lowpricedvape.com"><font color="#FFFFFF">www.lowpricedvape.com</font></a><br /> 
<font color="#3999A9"> Amigo, Vape, e Cig, Atomizer, Mod, Low Priced Vape, Cheap Vape, Discount Vape, Vape Deals, Ultimate Vape Deals, Vape 101, Your Vape, Vape World, Vape cart, Smok, Wismec, Itsuwa</font></div> 
</body> 
</html> 
+0

Avec cette architecture, vous aurez besoin d'un script pour détecter le périphérique et rediriger en conséquence. Je ne vois aucune fonctionnalité de ce type dans le code que vous avez montré. – showdev

+1

duplication possible de [meilleure façon de détecter les périphériques mobiles et de redirection] (https://stackoverflow.com/questions/26649767/best-way-to-detect-mobile-device-and-redirect) – showdev

Répondre

0

Essayez d'utiliser ce script sur votre page de bureau.

<script type="text/javascript"> 
<!-- 
if(/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)) { 

document.location = "mobile.html"; 
} 

</script> 
+1

une autre suggestion, son heure de Apprendre le webdesign réactif. Cela vous aidera à gérer une seule page et à rendre cette page réactive. Donc, c'est la même page sur le bureau et sur mobile. – Sameer

+0

Cela n'a pas fonctionné et maintenant vous avez marqué ma question avec un -1, donc la plupart des gens ne vont même pas regarder la question et essayer d'aider. Je suis un vétéran handicapé essayant de faire une vie simple en vendant des produits sur Internet et ne pas avoir beaucoup de chance parce que je ne peux pas obtenir mon site Web pour être mobile amical. – Dave

+0

Désolé pour votre condition, c'était juste une suggestion, c'est à vous de le faire si vous le faites ou pas, ce serait génial si vous l'apprenez, passez du temps à le lire, w3schools.com est le chemin à parcourir .. a beaucoup de bon contenu. – Sameer