-2

Tried adding the viewport code to my website many different ways, but can't get it to register I am a novice/self taught and need some help. Not a coder, made my own site for my photography. Can anyone take a look and see what I am doing wrong? www.jeffhenrikson.com Debugged myself but and can't get it fixed, do I have things arranged wrong? Is a line or command disabling it? Here is what I have...

<!DOCTYPE html>
<html>
<head>
<link rel="shortcut icon"href="http://jeffhenrikson.com/favicon.ico" />
<title>Jeff Henrikson</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://www.w3schools.com/w3css/4/w3.css">
</head>


<style type="text/css">

html, body {
    font-family: Arial, Helvetica, sans-serif;
    color: #000;
    font-size: 14px;
    height: 768px;
    width: 1100px;
    position:fixed;
    top:0;
    bottom:0;
    left:0;
    right:0;
    margin: auto;
}

a:link {
    color: #000;
    text-decoration: none;
}
a:visited {
    color: #000;
    text-decoration: none;
}
a:hover {
    color: #000;
    text-decoration: line-through;
}
a:active {
    color: #000;
    text-decoration: none;
}

@viewport {
  width: device-width ;
  zoom: 1.0 ;
}

</style>

<body>

<div style="position: relative; top: 75px; left: 135px;">
<img src="images/01.jpg" width="x" height="575"/></a>
</div>

<div style="position: absolute; top: 276px; left: 50px;">
  <a href="38.html">&#11044;</a>
 </div>
<div style="position: absolute; top: 276px; left: 1035px;">
  <a href="02.html">&#11044;</a>
</div>

<div style="position: absolute; top: 15px; left: 17px;">
<a href="index.html">JEFF HENRIKSON</a>
</div>
<div style="position: absolute; top: 15px; left: 982px; width: 55px;">
<a href="all_index.html">view all</a>
</div>
<div style="position: absolute; top: 719px; left: 982px;">
<a href="contact.html">contact</a>
</div>

</div>

</body>
</html>
  • 1
    The most important is to delete `xmlns = "http://www.w3.org/1999/xhtml"` – Grzegorz T. Jul 09 '19 at 22:08
  • 1
    Please read [Something on my web site doesn't work. Can I just paste a link to it?](http://meta.stackoverflow.com/questions/125997/something-on-my-web-site-doesnt-work-can-i-just-paste-a-link-to-it). Questions that depend on external resources to be understood become useless when the external resource goes away or is fixed. Create a [MCVE] and put it in **the question itself** instead. – Quentin Jul 09 '19 at 22:10
  • @GrzegorzT. — Deleting that isn't important at all. – Quentin Jul 09 '19 at 22:10
  • You probably need to wrap all your absolute position div tags in a div tag that has relative position. – Wes Jul 09 '19 at 22:14
  • @Quentin sorry am a novice and have been debugging it myself, I have built this and taught myself – Jeff Henrikson Jul 09 '19 at 22:28
  • Updated my question, hopefully this is more appropriate @Quentin – Jeff Henrikson Jul 09 '19 at 22:37
  • @JeffHenrikson — The question now contains some CSS which lays out HTML elements which aren't in the question. – Quentin Jul 10 '19 at 08:34
  • @Quentingot it, updated – Jeff Henrikson Jul 10 '19 at 14:34

1 Answers1

-1

Try including this tag in your head section.

<meta name="viewport" content="width=device-width, initial-scale=1.0">

UPD:

<meta name="viewport" content="width=device-width, user-scalable=no">
Alexander
  • 109
  • 1
  • 2
  • 14