Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我为我的最新设计创建了一个虚拟布局,但是当我在 ie7 中调整窗口大小以检查最小宽度是否有效时,它会将内容区域踢到侧边栏下方,而在所有其他浏览器(包括 ie6)中它的行为正如它应该做的那样。
演示链接
谁能看出是什么问题导致了这两个随机的额外像素启动它?
是的,在 IE 中似乎确实存在一个错误,其中min-width元素正在获得类似浮动的清除行为。
min-width
min-width在这种情况下,您可以通过将 应用到#container而不是两个子元素来轻松避免它。(通常最好将与布局相关的min-width修复放在可能的最高父元素上。)
#container
(此外,您不需要栏/内容上的 float-100%-width 规则。)