在IE中文本框中的左右浮動圖像奇怪的間距

[英]Floating an image right and left in text box weird spacing in IE


My example is here

我的例子就在這里

The logos look fine when told to align right or left in FF and they seem to wrap properly with the text, but in IE a huge gap shows up after the first line of text.

當被告知在FF中向右或向左對齊時,徽標看起來很好,它們似乎與文本正確包裝,但在IE中,在第一行文本后出現了一個巨大的間隙。

I have also created float right and left styles and tried to apply to the logos but got the same effect. I know this is an issue in IE, but I haven't found the fix for it yet.

我還創建了浮動左右兩種樣式,並嘗試應用於徽標但獲得了相同的效果。我知道這是IE中的一個問題,但我還沒有找到它的修復程序。

1 个解决方案

#1


Rather than using the align="left" and align="right" in your HTML, just include float attributes in your floatleft and floatright CSS declarations:

而不是在HTML中使用align =“left”和align =“right”,只需在floatleft和floatright CSS聲明中包含float屬性:

.floatleft {
    float:left;
    padding: 0px 8px 8px 0px;
}
.floatright {
    float: right;
    padding: 0px 0px 8px 8px;
}

注意!

本站翻译的文章,版权归属于本站,未经许可禁止转摘,转摘请注明本文地址:https://www.itdaan.com/blog/2009/05/08/720bc01d06b867a06a01aa50540c29a9.html



 
粤ICP备14056181号  © 2014-2020 ITdaan.com