html - IE7 li 图像和文本问题 - 文本。快工作了

标签 html css internet-explorer-7 internet-explorer-6

我使用的是无序列表。

左边是图片,右边是文字。

我今天才注意到 IE7 的显示非常糟糕,甚至无法接受。真遗憾没有早点意识到。

我给了图像一个类,文本包装在一个单独的 div 中。

<ul>
<li><a href="domain"><img src="http://www.domain.com/img.jpg" alt="img class="footer-thumb" width="40px" height="40px" /></a>
    <div class="recent-post-content">
    <p>day date time</p>
    <p><a title="Content title" href="http://www.domain.com/contentitle &raquo;</a></p>
    </div></li></ul>

到目前为止发生的事情是它在每个浏览器中都是完美的,除了 IE7,在 IE7 中图像恰好在它们应该在的位置但是类“最近发布的内容”全部被推到一个正好一个图像([li] 高度) 上面所以最后一张图片旁边没有任何文本,第一张图片 ([li]) 上面有它的“recent-post-content”。

我想这很简单,但在我自己走到这一步之后,我认为最好尝试并获得一些建议来解决最后一点问题。

有什么想法吗?

谢谢

最佳答案

修复

<img src="http://www.domain.com/img.jpg" alt="img class="footer-thumb" width="40px" height="40px" />

<img src="http://www.domain.com/img.jpg" alt="img" class="footer-thumb" width="40px" height="40px" />

并修复

<a title="Content title" href="http://www.domain.com/contentitle &raquo;</a>

<a title="Content title" href="http://www.domain.com/contentitle">&raquo;</a>

IE 会正常运行。

关于html - IE7 li 图像和文本问题 - 文本。快工作了,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2837653/

相关文章:

javascript - 使用 JavaScript 缩放浏览器

html - CSS Flex 拉伸(stretch)链接

html - Electron 按钮有奇怪的样式

css - li 元素内的 div 显示 block 使其有空白空间

Javascript 在 IE7 和 IE8 中不起作用

html - 即使使用 X-UA 元标记,IE9 也会进入 IE7 兼容性 View

css - ie7悬停问题

javascript - 如何在 html 中执行 SVN http-请求 checkin /提交

html - 如何在 CSS 中设置表格的整个第一行的样式

css - 具有多个列的 HTML 网格布局使用浏览器窗口的 100% 高度/宽度