如何当我有一个div样式显示:块; float:对,在IE6中,div仍然在文本之下,而不是在它的右边。它适用于所有其他浏览器,包括IE7 +。我需要显示块,因为如果我做内联显示,那么div内的菜单全部搞砸了。CSS IE6浮动权
.content { display:block; }
.float { width:150px; display:block; float:right; }
。没有{ display:inline; }
float类是不是没有什么类的权利,它在IE6下面,知道一个修复吗?
我假设这是什么意思:
<span>This is some text </span>
<div style="float: right;">
This is floated text
</div>
输出是这样的:
This is some text This is floated text
如果你离开浮动跨度,或
<span style="float:left;">This is some text </span>
<div style="float: right;">
This is floated text
</div>
切换文本的顺序和浮动
<div style="float: right;">
This is floated text
</div>
<span>This is some text </span>
它正常工作:
This is some text This is floated text
也许你可以包含一些HTML并接受你以前的答案。 – metrobalderas 2010-01-12 06:22:04
也许这属于doctype.com? – 2010-01-12 06:38:11
doctype上的类似问题:http://doctype.com/wierd-ie6-float-issue – Greg 2010-07-29 20:45:06