0
我想要的東西很簡單。IE7錯誤:float:右側寬度爲100%,而不是元素大小
我有一個div內的兩個按鈕。一個需要被浮動權,需要有浮動左
<div class="btnwrapper">
<div class="btnright"><a href="#" class="button"><span>Continue</span></a></div>
<div class="btnleft"><a href="#" class="button optionleft"><span>Back</span></a></div>
<div style="clear:both;"></div>
</div>
和相應的CSS
.calculator .btnwrapper { width:607px; }
.calculator .btnleft { float:left; border:1px solid green; }
.calculator .btnright { float:right; border:1px solid red; }
a.button { background:url(../images/bg-button-left.gif) no-repeat; float:right; height:29px; width:auto; padding:0 0 0 8px; display:block; color:#FFF; text-decoration:none; font-weight:bold; font-size:13px; cursor:pointer;}
a.button span { background:url(../images/bg-button-right.gif) top right; height:16px; padding:8px 8px 5px 0px; display:block; width:auto; cursor:pointer; }
這是我得到的IE7的結果。所有其他現代瀏覽器都能正確處理。
可以顯示它在其他瀏覽器中的顯示方式 – Jawad 2012-02-02 20:44:32
已添加,好建議 – 2012-02-02 20:47:31