不能定位Div,我相信这很简单

时间:2013-12-13 19:23:53

标签: css

我正在尝试定位我的表单,但似乎无法让它移动...特别是div“框”

我确定我做的很简单。我只需要能够在包装器div中定位“box”div。

谢谢!

<!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>
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
  <title>Instant Discount</title>
  <style type="text/css">
.WRAPPER {
    background-color: #000;
    height: 575px;
    width: 975px;
    background-image: url(exit-gate/exit-gate-bg2.png);
    top: auto;
    margin: -8px;
}
body {
    background-color: #000;
} 
box {
    border: none;
    position: relative;
    top: 200px;
    left: 200px;
}
#email {
    background: transparent;
    color:white;
    border: none;
    outline:none;
    height:30px;
    transition:height 1s;
    -webkit-transition:height 1s;
}
#email:focus {
    height:40px;
    width:250px;
    font-size:14px;
}
  </style>

 </head>
  <body>



<div class="WRAPPER">


 <div class="box">
    <input name="email" type="text" id="email">
    <form name="form1" method="post" action="insert_ac.php">
    <input type="image" src="exit-gate/white-box-10.png" alt="{alternate text}" name="submit" value="submit">
    </form>

   </div>
   </div>
   </div>
  </body>
</html>

1 个答案:

答案 0 :(得分:7)

你的css选择器错了:

.box {不是box {