0
我試圖創建一個搜索欄,就像會在yelp上找到的那樣。兩個酒吧並排居中。根據下面的代碼,我無法讓他們居中。我的想法是創建兩列,並肩並排,一個拉向右,另一個離開,但我沒有太多的運氣。有什麼建議?HTML/CSS兩個相鄰的搜索框
<HTML>
<form>
<div class="row">
<div class="col-sm-5 portfolio-item">
<div class="input-group" display="inline">
<input id="searchone" name="search" type="search" value="<?php echo $search_word;?>" class="form-control" placeholder="Name">
</div>
</div>
<div class="col-sm-5 portfolio-item">
<div class="input-group" display="inline">
<input id="searchtwo" name="search" type="search" value="<?php echo $search_word;?>" class="form-control" placeholder="Location">
<div class="input-group-btn">
<button class="btn btn-default btn" name="submit" type="submit">
<span id="glyph" class="glyphicon glyphicon-search" name="submit"></span>
</button>
</div>
</div>
</div>
<!-- /.row -->
<CSS>
.row .col-sm-5 .input-group .form-control{
width:300px;
float:center;}
'center'不是VAL 'float'的id屬性。 –