[英]Why is span and form div not aligned in firefox
The following html&css works fine in chrome but on firefox it is not aligned 以下html&css在chrome中运行良好,但在firefox上它没有对齐
<div class="btns">
<div id="green">
<span id="cls" class="btn btn-block btn-large btn-success disabled green_btn">Green</span>
</div>
<div id="red">
<form class="button_to" >
<div>
<input class="btn btn-block btn-large btn-danger red_btn" type="submit" value="Red">
</div>
</form>
</div>
</div>
css CSS
#cls:hover {
background:black;
cursor:pointer;
}
.btns {
position: relative;
}
.num {
position: absolute;
bottom: 0;
width: 100%;
text-align: center;
}
#green, #red {
display: inline-block;
width: 49%;
position: relative;
}
.green_btn, .red_btn {
margin-bottom: 4px;
}
here is the jsfiddle 这是jsfiddle
I don't understand why they are not aligned in firefox but in chrome they are fine. 我不明白为什么他们没有在firefox中对齐,但在chrome中它们很好。
used to this 习惯了
Define your #green, #red
id vertical-align:top;
定义你的#green, #red
id vertical-align:top;
#green, #red {
display: inline-block;
vertical-align: top;}
More information about this 关于此的更多信息
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.