我想通过几个问答将快速搜索的 div 居中,但没有运气。div 与背景图像一起向左浮动。
HTML
<div class="l-row">
<div class="QuickSearch">
<div class="loop"></div>
<form action=><div class="quickSearchInputName">xxx</div></form>
</div>
</div>
CSS
.QuickSearch {
background: url(/templates/_system/main/images/job-search-bg.jpg) no-repeat top left;
float:left;
width:900px;
height:170px;
display:block;
text-align:center;
margin: 0px auto 0px auto;
}
.loop {
/* background: url(quickSearch.png) no-repeat;*/
width: 10px; height: 135px;
display: block;
float: left;
margin: 0 0 0 2px;
}
l-row {
max-width:942px;
width:100%;
min-width:942px;
text-align:center;
}