使蓝图 CSS 在 IE 6 和 IE 7 中工作

发布于 2024-08-13 08:46:54 字数 131 浏览 2 评论 0原文

我正在使用 Blue print CSS,它在 Firefox 中工作正常......但是当我在 IE 中查看它时,即使使用 IE lt IE8,它在间距和对齐方面似乎仍然无法正常工作。

有什么建议我可以做些什么来使它看起来合适吗?

I am using Blue print CSS and it works fine in Firefox...but when I look at it in IE, even with the for IE lt IE8, it still doesn't seem to be working right in terms of spacing and alignment.

Any suggestions on what I can do to make it look proper?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

老旧海报 2024-08-20 08:46:54

确保您使用文档类型。如果不这样做,它将以怪异模式呈现。我遇到了同样的问题并纠正了文档类型。

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">

这应该位于文档的顶部

Make sure that you use a doctype. If you do not it will render in quirks mode. I had the same problem and correcting the doctype worked.

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">

That should go at the top of the document

你列表最软的妹 2024-08-20 08:46:54

您是否包含 ie.css 文件?在常规蓝图 css 文件下方,包含 ie.css 文件,使用只有 IE 才能解析的表示法:

<link rel="stylesheet" href="../../blueprint/screen.css" type="text/css" media="screen, projection"> 
<link rel="stylesheet" href="../../blueprint/print.css" type="text/css" media="print"> 
<!--[if lt IE 8]><link rel="stylesheet" href="../../blueprint/ie.css" type="text/css" media="screen, projection"><![endif]--> 

确保 CSS 文件的所有 URL 都正确并且也在您的网站上正常工作。

Are you including the ie.css file? Below the regular blueprint css files, include the ie.css file, using the notation that only IE will parse:

<link rel="stylesheet" href="../../blueprint/screen.css" type="text/css" media="screen, projection"> 
<link rel="stylesheet" href="../../blueprint/print.css" type="text/css" media="print"> 
<!--[if lt IE 8]><link rel="stylesheet" href="../../blueprint/ie.css" type="text/css" media="screen, projection"><![endif]--> 

Make sure that all the URLs to the CSS files are correct and are working on your site also.

画离情绘悲伤 2024-08-20 08:46:54

我知道这有点晚了,但希望它能帮助那些用谷歌搜索的人。

在这里使用蓝图时的一个大问题是确保您的容器 div 具有容器的 class,而不是 id:

<div class="container"> ... </div>

不是

<div id="container"> ... </div>

,之前已经让我困惑过几次了。

I know this is a bit late, but hopefully it'll help someone who googles it.

A big gotcha when using blueprint here is to ensure that your container div has a class of container, not id:

<div class="container"> ... </div>

Not

<div id="container"> ... </div>

It's caught me out a few times before.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文