送信ボタンと検索入力を揃えようとしましたが、うまくいかず、その理由がわかりません。私はこのスタイリングコードを持っています:
input[type=search]
border: none
cursor: text
padding: 0
border: 1px solid #cfcfcf
.search-main input, .search-main button
height: 30px
display: inline-block
.search-main button
background: #55e0a8
border: none
width: 18%
margin-left: -7px
display:inline-block
.search-main input
width: 80%
そしてこのhtml:
<form method="get" class="search-main">
<input name="q" type="search">
<button type="submit"></button>
</form>
そして、ここに私が得るものがあります:
かなりばかげた質問ですが、40 分以上試してみたので、ここに投稿しようと思いました。私はfirebug、パディング、マージンで遊んでいますが、問題の原因がわかりません。