我作爲搜索領域的一個文本框,如下所示,我想右對齊:如何對齊文本框?
<div class="col-md-6 search-form" style="padding:13px 0;">
<form action="/search" method="post">
<input type="search" name="q" style="max-width: 300px;" class="form-control" placeholder="Search here...">
</form>
</div>
我試圖與另一格周圍它試圖這樣做使用文本對齊,如下圖所示,但在這裏我想它
.new-search-div {
display: inline-block;
text-align: right;
}
引導'col-md-offset-2'作爲一個類的例子,也許你正在尋找的東西?... http://getbootstrap.com/css/#grid-offsetting – Daniel
http:// www。 bootply.com/LUTE2CSVmg,因爲你使用引導程序,已經有類似這樣的任務預定義的類...檢查'所有類'按鈕,並用你的標記玩一點。 – sinisake
請添加[mcve] –