我有一個白色寄存器內的div和一個更大的div內的搜索表單,如下圖所示。我有如何將此div放置在此搜索表單下方?
問題是,我想小分度,白邊境下面的搜索表單的位置,但它保持向左或搜索表單無論我做什麼的權利。我嘗試了幾件事,沒有任何工作。有誰知道如何解決這一問題? 注意:我爲此使用了wordpress和bootstrap。
CSS:
#cover {
padding-top: 110px; /*stops the text from pullung down the image*/
height: 580px;
background-image: url('http://image.jpg');
background-repeat: no-repeat;
background-size: cover;
background-position: center;
background-color: transparent;
text-align: center;
}
#postcode-search {
margin-top: 40px;
}
#postcode-bar {
height: 50px;
background-color: #fff;
text-align: center;
font-size: 13px;
/*outline: yellow;*/
}
#postcode-btn {
height: 50px;
}
#postcode-no {
width: 451px;
height: 50px;
display: list-item;
color: #fff;
text-align: center;
border: 2px solid #fff;
bottom: 10px;
}
HTML:
<div id="cover">
<div class="search-row">
<form role="search" method="get" class="search-form" action="<?php echo home_url(); ?>">
<div class="postcode-search col-lg-4 col-lg-offset-4">
<div id="postcode-search" class="input-group">
<input type="text" id="postcode-bar" class="form-control" value="<?php the_search_query();?>" placeholder="Enter your postcode"/>
<span class="input-group-btn">
<button class="btn btn-default" id="postcode-btn" type="button">FIND STORES</button>
</span>
</div><!-- /input-group -->
</div><!-- /.col-lg-6 -->
<div id="postcode-no"></div>
<?php
if (function_exists('woocommerce_product_search')) {
echo woocommerce_product_search(array('limit' => 40));
}
?>
</form>
</div>
</div>
做得很漂亮。發揮魅力。謝謝。 –
不錯,很高興我能幫忙! –