【发布时间】:2013-05-14 01:46:23
【问题描述】:
我在 Internet Explorer 7 中遇到了一个奇怪的问题,它显示的航向距离顶部很远。在其他浏览器或更新版本的 IE 中不存在此问题。
我应该怎么做才能使它正确?
Chrome 版本:
IE 7 版本:
HTML
<div class="box">
<header class="module-title">
<h2 class="title">گزارش و مصاحبه</h2>
</header>
<section class="module-content">
<ul class="sidebar-news">
<li>
<div class="image-holder">
<img src="img.jpg" alt="Test item">
</div>
<h3><a class="moduleItemTitle" href="#">Copy of مصاحبه با معاون صدا درباره راديو كتاب</a></h3>
.
.
.
</li>
</ul>
</section>
</div>
CSS
.module-title h2 { margin-top: 0; font-size: 26px; line-height: 30px; }
.sidebar-news { list-style: none; margin: 0; }
.sidebar-news h3 { font-size: 20px; line-height: 26px; margin-top: 0; }
.sidebar-news .image-holder { width: 140px; float: right; margin-left: 10px; }
更新 1: 我通过将 *margin: -20px; 提供给 .sidebar-news h3 来修复它,但我不喜欢我的解决方案!为什么会这样?有什么东西增加了这个差距吗?
【问题讨论】:
-
你先reset your css了吗?
-
不支持 IE7 是不是一个选项?
-
@Seza 是的,我正在使用
Bootstrap并启用了重置选项,并且我正在加载Modernizr.js -
@DerekHenderson 这不是一个选项,太多人仍在使用它,我必须在我的代码中支持它。
-
@faridv 我不能提供任何您可能还不知道的明智建议,但我要向您的雇主指出,IE7 存在零日漏洞,这可能会使他的计算机完全容易受到被超车并随时可以获取他或她的所有信息;更不用说它可能从网络中累积的任何不安全数据。在工作场所使用 IE7 的影响是非常负面的,并且来自在该领域工作了很长时间的人,我会敦促您的雇主从 IE7 更改。
标签: css internet-explorer internet-explorer-7