CSS: help neded for IE7

一个人想着一个人 提交于 2019-12-13 05:39:50

问题


For some reason http://funnyfurniture.net/ and http://funnyfurniture.net/p/5/teak-root-garden-chair/ are so badly broken in IE7. Can somebody suggest a fix?


回答1:


It's because you're using display: inline-block on .content li.shadow-pod.

IE7 only supports display: inline-block on elements that are naturally inline (such as <span>), unless you hack it into shape. Use this:

.content li.shadow-pod {
    /* your other rules */

    display: inline-block;
    *display: inline;
    zoom: 1
}

That's using the Star Property Hack to tell only <IE7 to apply the display: inline rule.

It is invalid CSS, but it does no harm. It's fine to break validation provided that you understand what you're doing. That said, you could always use a valid hack or a conditional comment instead:

<!--[if lt IE 8]>
<style>
.content li.shadow-pod {
    display: inline;
    zoom: 1
}
</style>
<![endif]-->

Also, see this previous answer I wrote: How to give Internet Explorer different CSS lines?




回答2:


you're using

.content li.shadow-pod {
    display: inline-block;
}

inline-block isn't fully supported in ie7

try float:left instead



来源:https://stackoverflow.com/questions/5732833/css-help-neded-for-ie7

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!