我想爲表格中的按鈕應用背景圖片。代碼工作並且在所有瀏覽器(Chrome,FF,Opera和Safari)中都很完美。但是,在IE8(我查看的唯一版本)中,圖像正在重複。我試圖遵循標準和簡單的HTML和CSS,但這真的很煩人。請參考下面在Internet Explorer中重複的背景圖片
圖片以下是HTML
<div id="header">
<div id="TopHead">
<div id="logo">
<a href="/" alt="eyaas">
<img src="logo.gif" alt="eyaas" />
</a>
</div>
<div id="country">India | Rest of the World
</div>
<div id="linksAndSearch">
<div id="linksTop">My Account | Login | Register | Cart
</div>
<div id="searchBar">
<form id="search_mini_form" action="" method="get" class="search">
<div class="searchBox">
<input id="Text1" type="text" name="" class="searchBoxDefaultText jsSearchTerm jsToggle" value="" />
</div>
<div class="searchButton">
<button type="submit" title="" class="searchBoxSubmitButton" />
</div>
<div class="clear"></div>
</form>
</div>
</div>
<div class="clear"></div>
</div>
<div id="TopNav">
</div>
</div>
以下是CSS
#linksAndSearch { float:left; }
.search { width:393px; height:35px; background-image:url('SearchBoxGrayFrameText.gif'); }
.searchBox { float:left; margin:6px 0 0 65px; background-image:url('SearchBoxFramed.gif'); width:275px; height:23px; overflow:hidden; }
.searchBox .searchBoxDefaultText { width:257px; height:19px; margin:2px 0 0 5px; font-size:15px; color:#CCC; }
.searchButton { float:left; margin:6px 0 0 10px; }
.searchBoxSubmitButton { width:29px; height:23px; background-image:url(SearchSubmitBtnYellowArrow.gif); background-repeat:no-repeat; }
一些類似的bug:http://haslayout.net/css/Float-Squeeze-Duplicate-Last-Character-Bug您的IE在IE8或IE7模式下運行(和/或其他任何兼容模式)? – biziclop
我在正常模式下運行IE8 –