2014-03-31 37 views
0

我正在使用一個窗體進行網站搜索與文本框中的按鈕。在桌面版本上,它可以正常工作,但在調整到移動設備時並非如此。我正在使用一個位置:絕對;設置按鈕定位,給它一個固定的位置。有什麼方法可以讓我在移動版上也能做到這一點?引導窗體,而移動

HTML:

<!-- Right search form --> 
    <div class="col-md-3 col-xs-12"> 
     <form class="form-inline" role="search"> 
     <div class="form-group"> 
      <input type="text" class="form-control search-input" size="40" placeholder="Cauta in site..."> 
      <input type="submit" value="" class="search-button" id="searchsubmit"> 
     </div> 
     </form> 
    </div> 

CSS:

.search-button { 
background: url('../images/search-btn.png') right no-repeat; 
border: 0px solid black; 
border-left: none; 
cursor: pointer; 
height: 35px; 
width: 35px; 
position:absolute; 
left:241px; 
top: 3px; 
} 

回答

2

您可以使用引導類 reference here

<div class="input-group"> 
    <span class="input-group-btn"> 
    <button class="btn btn-default" type="button">Go!</button> 
    </span> 
    <input type="text" placeholder="Cauta in site..." class="form-control"> 
</div><!-- /input-group -->