我對目前之情況下HTML和CSS:CSS不工作的按鈕appearence - Internet Explorer的
正如你可以看到,搜索文本框和過濾器的下拉是完美地呈現在 - 線。但按鈕正在出現。
這裏是所有3個控件的HTML代碼:
<table>
<tbody>
<tr>
<td>
<div class="search_result_div">
<div>
<input type="text" style="width:200px;" id='searchButton' value="some text"><span> in </span>
<select id="filterDropdown">
<option value="all" selected="selected">All Areas</option>
<option value="docs">Documents</option>
</select>
<a onclick="return callSearch();" class="btn" id="searchButton" href="../sys/SearchResults.aspx?q="><span>Search</span></a>
</div>
</div>
</td>
</tr>
<tr>
<td>
</td>
</tr>
</tbody>
</table>
這裏是所有控件的CSS:
.search_result_div a.btn
{
background: url("/images/bg_btn_left.gif") no-repeat scroll left center transparent;
display: inline !important;
float: none;
font-size: 11px !important;
line-height: 21px !important;
margin: 0 !important;
outline: medium none;
padding: 3px 0 3px 2px !important;
text-indent: inherit !important;
}
.search_result_div a.btn span
{
background: url("/images/bg_btn.gif") no-repeat scroll right center transparent;
font-weight: bold !important;
margin: 0 !important;
padding: 4px 8px 4px 6px !important;
}
注:該按鈕分爲兩個圖像。
bg_btn_left.gif:
bg_btn:
請建議我要去哪裏錯了?
謝謝
嘿,現在給輸入{垂直對齊:首位; }在你的css文件中 – 2012-07-13 06:40:23
謝謝。你能告訴我我應該把它放在哪裏嗎? – 2012-07-13 06:42:59