您好,我有以下(查看)html 代码和 css 产生了这个结果,我该如何对齐它?
结果
查看
<div class="divfloatleft" >@Html.DropDownListFor(model => model.tintFactorType , slFactorType, new { @class = "divfloatleft rulestextbox5" })</div>
<div class="divfloatleft" >@Html.TextBoxFor(model => model.decFactorValue, new { @class = "divfloatleft rulestextbox6" })</div>
<div class="divfloatleft" >@Html.TextBoxFor(model => model.decMaxBonus, new { @class = "divfloatleft rulestextbox7" })</div>
<div class="divfloatleft" >@Html.TextBoxFor(model => model.nvarMsg , new { @class = "divfloatleft rulestextbox8" })</div>
<div class="divfloatleft" >@Html.TextBoxFor(model => model.varVCode , new { @class = "divfloatleft rulestextbox9" })</div>
<div onclick="removeControl(this);return false;" class="remove removeimg divfloatleft"></div>
CSS
.rulestextbox5 {
min-width: 125px !important;
width:125px !important;
height:30px !important;
margin-right:6px;
top:30px;
}
.rulestextbox6 {
min-width: 80px !important;
width:80px !important;
height:20px !important;
margin-right:6px;
}
.rulestextbox7 {
min-width: 89px !important;
width:89px !important;
height:20px !important;
margin-right:6px;
}
.rulestextbox8 {
min-width: 72px !important;
width:72px !important;
height:20px !important;
margin-right:6px;
}
.rulestextbox9 {
min-width: 70px !important;
width:70px !important;
height:20px !important;
margin-right:6px;
}
.removeimg {
cursor:pointer;
width: 19px !important;
height: 18px !important;
background: transparent url("images/basicsetup/remove.png") no-repeat center center !important;
}
最佳答案
除了您向我们展示的 CSS 之外,请记住使用开发工具检查可能影响您的组合框和 div 的 CSS。
position: relative;
top: 0px;
关于html - 如何对齐下拉列表和 img 按钮?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18909984/