ウェブで検索ボックスを実装するためにa good css/html codeを選択しました。しかし、私は検索ボックスを中央に移動することはできません。以下のCSSコードは検索ボックスです。検索ボックスを中央に合わせる
#search {
width: 357px;
margin: 4px;
}
#search_text{
width: 297px;
padding: 15px 0 15px 20px;
font-size: 16px;
font-family: Montserrat, sans-serif;
border: 0 none;
height: 52px;
margin-right: 0;
color: white;
outline: none;
background: #1f7f5c;
float: left;
box-sizing: border-box;
transition: all 0.15s;
}
<li id="search">
<form action="" method="get">
<input type="text" name="search_text" id="search_text" placeholder="Search"/>
<input type="button" name="search_button" id="search_button"/>
</form>
</li>
私は、検索ボックスを整列させるためのコードをどのように修正する必要がありますか?
ありがとうございました。
あなたのHTMLも投稿してください – mehulmpt
@MehulMohan私は自分のhtmlコードを追加しました。ありがとう。 – Eric