无法获得边距:在 IE7/8 中自动坚持 960 网格系统

发布于 2024-09-29 19:31:19 字数 298 浏览 0 评论 0原文

我读到很多人都遇到了这个问题,并且我尝试了所有我能找到的解决方案 - 希望有人不能指出我在哪里犯了错误。

我正在此网站工作,据我所知,我在标准模式。文档类型是文件中的第一个内容,并且它是有效的。我尝试使用带有 text-align: center 的包装 div 或 body 标签,以及使用 text-align: left 的容器 div。

我似乎找不到任何有效的东西。任何想法将不胜感激。

I've read about quite a few people having a problem with this and I've tried all the solutions I can find - hopefully someone can't point out where I'm making a mistake.

I'm working on this site, and as far as I can tell, I'm in standards mode. The doctype is the first thing in the file, and it's valid. I've tried using a wrapper div or body tag with text-align: center and the container div using text-align: left.

I can't seem to find anything that works. Any ideas would be greatly appreciated.

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

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

发布评论

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

评论(1

迷爱 2024-10-06 19:31:19

您的问题看起来像是在 ie7.css 文件中。它有这样的规则:

* {
  display:inline;
  zoom:1;
}

内联元素没有边距。您需要删除此规则,或将 display:block; 添加到 .container_12 某处。

Your problem looks like it's in the ie7.css file. It has this rule:

* {
  display:inline;
  zoom:1;
}

Inline elements don't have margins. You'll need to drop this rule, or add display:block; to .container_12 somewhere.

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