入力テキストフィールドと送信ボタンが並んでいないというばかげた問題があり、それを修正するエレガントな解決策が本当にわかりません。下の画像でわかるように、入力テキスト フィールド (右上に「キーワードを入力」というラベルが付いています) は、「検索」送信ボタンより 2px 高くなっています。
HTMLは次のとおりです。
<div id="search">
<form action="#" method="POST" id="search_form">
<div id="search_inputs">
<input type="text" placeholder="Enter Keywords" name="keywords" />
<input class="button" type="submit" name="search" value="SEARCH" />
</div>
</form>
</div>
CSSコードは次のとおりです。
#search_form .button {
background: black;
color: white;
padding: 3px 15px;
border: none;
font-size: 7pt;
height: 18px;
}
#search_form input[name="keywords"] {
width: 175px;
}
#search {
margin-top: 7px;
float: right;
}
font-size を 7pt に設定するとめちゃくちゃになると確信していますが、その理由はわかりませんし、その領域の他のボタンのフォントサイズであるため、これに対処する方法もわかりません。
助けてくれてありがとう!