我的框不會移動我的GCSE課程作業。有什麼建議麼?過去有人有這個問題嗎?輸入框不會移動使用HTML和CSS
的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'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方面進行。
你是什麼意思,他們不會移動?是因爲你的頭上有'position:fixed'嗎? – cocoa
你想要存檔什麼?輸出結果應該如何?本文(http://stackoverflow.com/help/how-to-ask)可能會幫助您提出問題,這將吸引更多的關注和更好的答案 –