編集:ここで検索ボックスをライブで見ることができます。
説明する前に、私が使用しているコードをお見せしましょう。
HTML
<div class="SiteSearch">
<form action="/search" id="searchform" method="get">
<input x-webkit-speech="" autocomplete="off" type="text" id="gText" name="q" id="q" onblur="if (this.value == '') {this.value = 'Search';}" onfocus="if (this.value == 'Search') {this.value = '';}" value ='' "search" placeholder="Search.."/>
<input type="submit" id="gBtn"/>
</form>
</div>
CSS
#Head .SiteSearch {
top: 12px;
right: 0;
}
#Head .SiteSearch {
float: right;
position: relative;
}
input#gText {
float: left;
width: 225px;
height: 23px;
line-height: 24px;
text-indent: 5px;
font-family: arial,sans-serif;
font-size: 1em;
color: #333;
background: white;
border: solid 1px #D9D9D9;
border-top: solid 1px silver;
border-right: none;
vertical-align: middle;
-webkit-appearance: none;
-webkit-border-radius: 0px;
}
#searchform #gBtn {
background-image: url('search.png');
width: 31px;
height: 27px;
}
#gBtn {
vertical-align: middle;
cursor: pointer;
width: 40px;
height: 31px;
line-height: 100%;
padding: 0;
font-size: 0;
text-indent: -999px;
color: transparent;
background-position: 0 0;
border: none;
-webkit-appearance: none;
-webkit-border-radius: 0px;
}
input#gBtn:hover {
background-position: 31px 0;
border: none;
}
これは、検索ボックスが IE7 と IE8/IE9 でどのように見えるかです:
上記のように、IE7 では入力ボタンの画像が表示されません。どうすればこれを修正できますか?
どんな助けでも大歓迎です。ありがとう!