输入框不会使用HTML和CSS移动

时间:2015-10-14 19:29:50

标签: html css

我的盒子不适合我的GCSE课程。有什么建议?过去有人遇到过这个问题吗?

的CSS

body {
background-image: url("http://wallpoper.com/images/00/37/65/24/blue-     circles_00376524.jpg");
background-attachment:fixed;
margin: 0;
padding: 0;
}

#main #content {
height: 1300px;
width: 1100px;
margin-left: auto;
margin-right: auto;
background-color: #FFFFFF;
margin-top: 70px;
margin-bottom: 100px;
border-radius: 10px 10px 10px 10px; 
opacity:0.1;
z-index:1;  
}

#main #header {
height: 55px;
background-color:rgba(255,255,255,0.1);
width: 100%; 
position:fixed;
z-index:4;
color: white;
top: 0%;
}

#main #header #header1 {     
text-align: left;
font-family: 'Poiret One', cursive;
font-weight: 400;
font-size: 17px;
margin-top: -15px;
}

#main #header #unametext {
font-family: 'Poiret One', cursive;
font-weight: 400;
font-size: 23px;
margin-top: -68px;
margin-right: 550px;
margin-left:auto;
height: 40px;
width:100px;
}

#main #header #pwordtext {
font-family: 'Poiret One', cursive;
font-weight: 400;
font-size: 27px;
margin-top: -90px;
margin-right: 200px;
margin-left:auto;
height:40px;
width: 100px;
}

#main #footer {
text-align:center;
font-family: 'Poiret One', cursive;\
color: white;
font-size: 20px;
}

p {
color: white;
}

#main #header #unamebox {
height: 20px;
width: 100px;
margin-top: -40px;
position: absolute;
}

HTML

<!DOCTYPE html>

<head>
<title>Jack</title>

<link rel="stylesheet" type="text/css" href="style.css">
    <link href='https://fonts.googleapis.com/css?family=Poiret+One'  rel='stylesheet' type='text/css'>

</head>


<body>

<div id = "main">

<div id = "header">


    <div id = "header1">

        <h1>Jack&#39;s Website</h1>

    </div>

    <form action = "login.php" method = "post">

    <div id = "unametext">

        <h2>Username:</h2>

    </div>

    <div id- "unamebox">

        <input name = "uname" type = "text">

    </div>

    <div id = "pwordtext">

        <h3>Password:</h3>
    </div>

    <div id = "pwordbox">

        <input name = "pword" type = "password">
    </div>

    <div id = "smitbtn"></div>

    <form>
</div>

<div id = "content">

</div>

<div id = "footer">
    <p>This website was created by Jack</p>
</div>
</div>




</body>
</html>

在我继续学习课程的php方面之前,我必须对此进行排序。

1 个答案:

答案 0 :(得分:0)

您似乎有错误。你错过了一个&#34; =&#34;

<div id- "unamebox">

    <input name = "uname" type = "text">

</div>

更改为:

 <div id= "unamebox">

   <input name = "uname" type = "text">

</div>

希望这会有所帮助。快乐的编码!