表单元素不可点击html CSS

时间:2019-05-30 19:19:29

标签: php html css forms input

我的登录页面上的按钮和文本字段无响应/我无法单击或与它们交互。昨天运行良好,并链接到PHP数据库。我不知道我更改了什么代码,但是可能是CSS停止了它的工作。任何建议都会很棒,因为我迷路了。

我曾尝试编辑CSS,但还是有用。

<!DOCTYPE HTML>
<html lang="en">
<head>
  <title>Maoine in Eirinn (MIE) Wild Atlantic Gaeltacht Properties</title>
  <meta charset="utf-8">
 <link rel="stylesheet" href="css/styles.css">
 </head>
<body>
<div id="container">
<?php include("includes/header.html");?>
<?php include("includes/nav.html");?>
<div id="content">
<?php
if (empty($_SESSION))
session_start();
if (isset($_SESSION['errors'])) {
echo "<div class='form-errors'>";
foreach($_SESSION['errors'] as $error)
{
 echo "<p>";
 echo $error;
 echo "</p>";
}
echo "</div>";
}
unset($_SESSION['errors']);
?>
<div id="login">
<h3> Login </h3>
<form action="login_action.php" method="POST">
<p>
Username: <input type="text" name="adminname" required="required">
</p><p>
Password: <input type="password" name="password" required="required">
</p><p>
<input type="submit" value="Login">
</p>
</form>
</div>
</div>
<?php include("includes/footer.html");?>
</div>
</body>
</html>




body{background-color: #EEEEEE; }

#container{margin: auto; 
    width: 100%;
    background-color: #EEEEEE;
    border: 10px solid #EEEEEE;
    }

#header{
    background-color: #449966;
    height: 110px;
    margin-top: 38px;
    }

#nav{background-color: #000000;
    clear: left;
      }
#moira{
  float:right;
  padding-right: 50px;
  position: relative;
  margin-left: 50px;
}
#martin{
  float:right;
  padding-right: 50px;
  position: relative;
  margin-left: 50px;
}
#openinghours{`
  width: 30%;
  float:left;
  margin-left: 100px;}
#contactus{width: 50%;
  float:left;
  margin-bottom: 200px;}
#content{background-color: #EEEEEE;
    padding: 50px;
    min-height: 500px;
    text-align: center;
    }

#content a {background-color: #449966; color: white; text-decoration:none; padding:5px;}
#content a:hover {background-color: #878787; color: white;}

#footer{background-color: #449966;
    height: 50px;
    padding: 10px;
    display: flex;
    margin-top: 200px;
    bottom: 0;
    width: 100%;
    position: fixed;
}
#comments {width: 70%; float: left;}
.container{
    position: relative;
    border-radius: 8px;
    width: 90%;
    height: 500px;
    overflow: hidden;
}
#login{z-index: 100;}
#logo {float:left;}
#copyright {float:left;}
#footer ul{    text-align: center;
     width: 50%;
     margin: auto;}
#footer a{ color:#449966; }
#socialMedia{float:right; width: 150px; display: flex;}
#sitename{text-align: center;
       width: 100%;}
#languageimage img{
  border: 1px solid #ddd;
  border-radius: 50%;
  float:right;
  display: flex;
  vertical-align: top;}
table td {padding: 10px;}
table {width: 100%}

table tr:nth-child(1) {
    background-color: #449966;
    }
table tr {
    background-color:#FFFFFF;
    }
#displayproperties{width: 75%;}
#addtestimonial{width: 25%; margin-left: 50px; float: right;}
#addtestimonial table {border: 0px;}
#addtestimonial table tr td {padding: 0px; border: 0px;}
#addtestimonial table tr {background-color: #c6e1e0; border: 0px;}


.show {display:block;}

#commentform { 
           font-family: Arial;
                 width: auto;
         }
label { float:left;
    width: 50px; 
    clear: left;
    text-align: left;
    padding-right: 15px;
    margin-top: 10px;
    }
input, textarea {margin-top: 10px; }
#mysubmit { margin-left:65px;
        padding-bottom: 10px;
          }


body {margin:0;font-family:Arial}

.topnav {
  overflow: hidden;
  background-color: #333;
  position: fixed;
  top: 0;
  width: 100%;
}

.topnav a {
  float: left;
  display: block;
  color: #f2f2f2;
  text-align: center;
  padding: 14px 16px;
  text-decoration: none;
  font-size: 17px;
}

.active {
  background-color: #449966;
  color: white;
}

.topnav .icon {
  display: none;
}

.dropdown {
  float: left;
  overflow: hidden;
}

.dropdown .dropbtn {
  font-size: 17px;    
  border: none;
  outline: none;
  color: white;
  padding: 14px 16px;
  background-color: inherit;
  font-family: inherit;
  margin: 0;
}

.dropdown-content {
  display: none;
  position: fixed;
  background-color: #f9f9f9;
  min-width: 160px;
  box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
  z-index: 1;
}

.dropdown-content a {
  float: none;
  color: black;
  padding: 12px 16px;
  text-decoration: none;
  display: block;
  text-align: left;
}
#youtubewaw{margin-bottom: 200px;}

.topnav a:hover, .dropdown:hover .dropbtn {
  background-color: #449966;
  color: white;
}

.dropdown-content a:hover {
  background-color: #449966;
  color: black;
}

.dropdown:hover .dropdown-content {
  display: block;
}
@media only screen and (max-width: 1200px) {
    #openinghours{float:none;}
    #addtestimonial{float:none;}

@media only screen and (max-width: 768px) {
    body{font-size:90%;}
    #displayproducts td:nth-child(1){display:none;}
    #commentform{width: auto; font-size: 80%;}
    #mysubmit{margin-left: 0;}
    #openinghours{float:none;}
    td:nth-of-type(4){display:none;}
    #content{ padding: 0px;}}

@media screen and (max-width: 768px) {
    #sitename{display:none;}
  .topnav a:not(:first-child), .dropdown .dropbtn {
    display: none;
  }
  .topnav a.icon {
    float: right;
    display: block;
  }

}

@media screen and (max-width: 768px) {
    #sitename{display:none;}
  .topnav.responsive {position: relative;}
  .topnav.responsive .icon {
    position: absolute;
    right: 0;
    top: 0;
  }
  .topnav.responsive a {
    float: none;
    display: block;
    text-align: left;
  }
  .topnav.responsive .dropdown {float: none;}
  .topnav.responsive .dropdown-content {position: relative;}
  .topnav.responsive .dropdown .dropbtn {
    display: block;
    width: 100%;
    text-align: left;
  }
}

2 个答案:

答案 0 :(得分:1)

我注意到您的字符是偶然的。

!define PATHONE ""

您还拥有一个名为#mysubmit的ID,但您的提交输入未使用该ID。

答案 1 :(得分:0)

我删除了以下内容,并且一切正常。我不明白为什么,但是我对此很陌生

。容器{     位置:相对;