简体   繁体   English

Internet Explorer 7 CSS问题

[英]internet explorer 7 css issue

cart theme which uses smarty template engine. 使用smarty模板引擎的购物车主题。 I am able to move the shoping cart links to above the top menu and it shows Ok with IE8 firefox etc. Hovewer IE7 make an empty space. 我可以将购物车链接移至顶部菜单上方,并且它在IE8 firefox等显示器上显示“确定”。Hovewer IE7留有空白。 How could I make IE7 happy. 我如何才能使IE7开心。 I added the necessary style-sheets and tpl files . 我添加了必要的样式表和tpl 文件 Main css files are style.css and stle.base.css. 主要的CSS文件是style.css和stle.base.css。


IE8 no space IE8没有空间 替代文字
(source: livefilestore.com ) (来源: livefilestore.com

IE7 with space IE7与空间 替代文字
(source: livefilestore.com ) (来源: livefilestore.com

IE7 doesn't render CSS well. IE7不能很好地呈现CSS。 Create a special CSS file for IE7 and include it in your HTML as follows: 为IE7创建一个特殊的CSS文件,并将其包含在HTML中,如下所示:

<!--[if lte IE 7]>
<link href="ie7.css" rel="stylesheet" type="text/css">
<![endif]-->

In ie7.css, modify the margins, padding, etc. until the two versions appear identical. 在ie7.css中,修改边距,填充等,直到两个版本看起来相同。

The answer above is helpful, but in additional: 上面的答案很有帮助,但另外:

Add this in the <head></head> tags: 将此添加到<head></head>标记中:

<!--[if lte IE 7]>
<link href="ie7.css" rel="stylesheet" type="text/css">
<![endif]-->

Inside the ie7.css you add the element to it, eg 在ie7.css内,向其中添加元素,例如

.cart-thingy {
    margin: -10px 0 0 0;
}

And so on. 等等。

This will certainly help as well: 这当然也会有所帮助:

Conditional comments 有条件的评论

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM