Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/79.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/css/41.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Html 为什么我的表单输入在刷新页面时有时会移动?_Html_Css_Forms - Fatal编程技术网

Html 为什么我的表单输入在刷新页面时有时会移动?

Html 为什么我的表单输入在刷新页面时有时会移动?,html,css,forms,Html,Css,Forms,在我正在设计的页面上,我有一个表单,其中有一个文本输入。通常情况下,这个表单和输入在我的浏览器Chrome中正确渲染,但偶尔,它会在应该的位置左侧渲染大约20个像素。当我刷新页面时,它会回到原来的正确位置 到目前为止,我只在Chrome上进行了测试,所以这不是一个跨浏览器的问题(它发生在同一个浏览器中)。我下面的代码有什么问题吗 以下是我的HTML代码: <!DOCTYPE htmls> <html xmlns="http://www.w3.org/1999/xhtml">

在我正在设计的页面上,我有一个表单,其中有一个文本输入。通常情况下,这个表单和输入在我的浏览器Chrome中正确渲染,但偶尔,它会在应该的位置左侧渲染大约20个像素。当我刷新页面时,它会回到原来的正确位置

到目前为止,我只在Chrome上进行了测试,所以这不是一个跨浏览器的问题(它发生在同一个浏览器中)。我下面的代码有什么问题吗

以下是我的HTML代码:

<!DOCTYPE htmls>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<link rel="stylesheet" href="style.css" type="text/css" />
<title>Test Site</title>
</head>
<body >
<div id="supercontainer" class="style1">
    <img class="floater" src="top.jpg" alt="Top" />

        <img class="floater" src="left.jpg" alt="Left" />
        <div id="content">
            <p id="theText">
                Welcome. Please type a username.
            </p>

            <form id="prompt">
                <div><input type="text" name="promptLine" autocomplete="off" id="promptLine" onkeypress="return submitenter(event);" value="% " /></div>
            </form>
        </div>
        <img class="floater" src="right.jpg" alt="Right" />

    <img class="floater" src="bottom.jpg" alt="Bottom" />
</div>

尝试关闭你的正文和HTML标记?还有,doctype“htmls”

选中,这就是HTML的doctype。我确实关闭了那些标签,只是没有在上面复制。我从来没有听说过“htmls”。我们如何知道真正的错误和“只是没有复制”之间的区别?
#supercontainer {
margin: 0 auto;
width: 900px;

display: block;
}

img.floater {
display: inline;
float: left;
}

#content {
background-color:black;
display: inline;
float: left;

padding-left:5px;
padding-right:5px;
min-height:458px;
max-height:458px;
min-width: 803px;
max-width: 803px;

color: lime;
}

#theText {
text-align:left;
margin-bottom:0;
margin-top:0;

line-height: 0.3;

font-family:"Courier New", Courier, monospace;
}

#prompt {
position: fixed;
top: 470px;
}

#promptLine {
width: 100%;
background-color: black;

color: lime;

border: none;
outline:none;
}