Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/71.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
Can';t在Div中的HTML表单上输入文本_Html_Css - Fatal编程技术网

Can';t在Div中的HTML表单上输入文本

Can';t在Div中的HTML表单上输入文本,html,css,Html,Css,我制作了一个表单,它本身就可以很好地工作,但是一旦我把它放在我的网站上,我就不能点击任何框来输入文本。我相信我已经把它缩小到了我的导航栏(div中的菜单)和我正在使用的另一个div之间的冲突,可能要等到719px——但如果我错了,请纠正我。我是新来的,所以我不知道问题在哪里,也不知道为什么会发生。提前感谢您的帮助 HTML: <div class="menu"> <ul> <li><a href="#">Social</a>

我制作了一个表单,它本身就可以很好地工作,但是一旦我把它放在我的网站上,我就不能点击任何框来输入文本。我相信我已经把它缩小到了我的导航栏(div中的菜单)和我正在使用的另一个div之间的冲突,可能要等到719px——但如果我错了,请纠正我。我是新来的,所以我不知道问题在哪里,也不知道为什么会发生。提前感谢您的帮助

HTML

 <div class="menu">
<ul>
    <li><a href="#">Social</a></li>
    <li><a href="#">Contact</a></li>
    <li><a href="#">Skills</a></li>
  <li><a href="#">Portfolio</a></li>
<li><a href="#">About</a></li>
</ul>
</div>

<div class="containers">
<h2>Get in Touch</h2>

 <form method="post" action="confirm.php">
 <label for ="name">Name: </label><span class="error">* required</span>
 <input type="text" name="name" required/><br /> 
 <label for ="email">E-Mail: </label><span class="error">* required</span>
 <input type="email" name="email" required/><br />
 <label for ="topic">Topic: </label><span class="error">* required</span>
 <input type="text" name="topic" required/><br />
 <label for ="question">Longest Time You've Spent in a Car: </label><span class="error">* required</span>
 <input type="text" name="question" required/><br />
  <label for ="thoughts">Thoughts for Shoshi: </label><span class="error">* required</span>
  <textarea name="message" rows="15" cols="100" required></textarea><br />
  <input type="submit" value="Share Your Thoughts" />
  </form>
</div>
@media only screen and (min-width: 319px) {
h2 {
font-family: 'Special Elite', cursive;
    font-size: 1.7em;
font-weight: 500;
    text-align: center;
}

.containers {
background: rgba(255,255,255, 0.9);
padding: 15px;
margin: 0;
background-attachment: fixed;
background-position: center;
background-repeat: no-repeat;
background-size: cover;
font-size: 1.5em;
} 
}

@media only screen and (min-width : 410px) {   
.menu {
font-size: 2.1em;
    margin-top: 1.9em;
}
.menu ul {
    margin-top: 28%;
}
}

@media only screen and (min-width : 768px) {     
.menu {
display: block!important;
position: fixed;
font-size: .9em;
width: 100%;
margin-top: -.3em;
background: rgba(255, 255, 255, 0);
}
}

多亏了TricksfortheWeb


制作z索引:100,添加位置:相对于容器div类。

更改表单的属性。并添加一个
位置:相对
Yay!那很有效!非常感谢你!嘿,我刚刚注意到,对于z-index 100,当页面处于响应模式时,下拉菜单位于所有内容的后面。有什么想法吗?