我正在尝试在jquery弹出窗口中设置一个表单,我想给每个元素一个宽度,使输入字段看起来很好,都在同一列中。但它不起作用,我认为这是因为它们位于固定div的位置。我怎么能解决它?
这是HTML代码:
<div id="toPopup">
<div class="close"></div>
<div class="popup_content">
<form>
<ul>
<li><label>Conductor<label><input type=text></li>
<li><label>Entrega<label><input type=text></li>
</ul>
</form>
</div>
</div>
<div id="backgroundPopup"></div>
和CSS:
#backgroundPopup {
z-index:1;
position: fixed;
height:100%;
width:100%;
background:#000000;
top:0px;
left:0px;
display:none;
}
#toPopup {
display:none;
background: none repeat scroll 0 0 #FFFFFF;
border: 3px solid #F5F5DC;
left: 50%;
margin-left: -303px;
position: fixed;
top: 20%;
width: 600px;
z-index: 2;
}
div.close {
background: url("../img/closebox.png") no-repeat scroll 0 0 transparent;
cursor: pointer;
height: 30px;
position: absolute;
right: -27px;
top: -24px;
width: 30px;
}
div.popup_content {
padding: 8px 20px;
}
/* qui personalizzo il form interno al popup*/
div.popup_content form label{
font-size:0.8rem;
font-weight:bold;
margin-bottom:4px;
padding-left:10px;
height:32px;
line-height:32px;
display:block;
width:400px;
float:left;
}