Html 如何消除internet explorer中的空白?
在InternetExplorer7/8中,我有一个类似Facebook的按钮,这让我感到困扰(在Firefox、谷歌Chrome或IE9(+))中不会出现这种情况) 我想去除白色区域,但如何去除?相关的HTML和CSS是Html 如何消除internet explorer中的空白?,html,css,graphics,components,Html,Css,Graphics,Components,在InternetExplorer7/8中,我有一个类似Facebook的按钮,这让我感到困扰(在Firefox、谷歌Chrome或IE9(+))中不会出现这种情况) 我想去除白色区域,但如何去除?相关的HTML和CSS是 <div class="fbstuff"> <div style="margin-top:3px;margin-left:15px;float:right;"> <iframe src="http:
<div class="fbstuff">
<div style="margin-top:3px;margin-left:15px;float:right;">
<iframe src="http://www.facebook.com/plugins/like.phphref=http://www.bnano.eu&layout=button_count&locale=en_US" scrolling="no" frameborder="0" style="border:none; width:200px; height:80px"></iframe>
</div>
</div>
我不知道为什么会出现白色区域,这似乎只发生在IE8中。我能做些什么来解决这个问题?实时链接。谢谢。您正在将宽度和高度设置为200x80:
width:200px; height:80px
删除此代码。您正在将宽度和高度设置为200x80:
width:200px; height:80px
删除此代码。您正在此处设置iframe的html宽度和高度:
width:200px; height:80px
如果删除这些值,浏览器将呈现iframe的默认大小。而是将这些值设置为精确的按钮尺寸
在IE中而不是在firefox中看到它的原因是firefox将iframe背景渲染为透明,而旧IE将其渲染为白色您正在此处设置iframe的html宽度和高度:
width:200px; height:80px
如果删除这些值,浏览器将呈现iframe的默认大小。而是将这些值设置为精确的按钮尺寸
你在IE中看到它而不是在firefox中看到它的原因是firefox将iframe背景渲染为透明,而旧IE将其渲染为白色padding:0;保证金:0?你似乎用宽度来设置右边距?为什么不使用右边距和跳过宽度/高度?填充:0;保证金:0?你似乎用宽度来设置右边距?为什么不使用右边距和跳过宽度/高度?