【问题标题】:IE8 not displaying ONE image [closed]IE8不显示一个图像[关闭]
【发布时间】:2012-12-28 23:49:09
【问题描述】:

这快把我逼疯了。我在一个站点上工作,所有其他浏览器都显示此图像,包括 IE6、7 和 9。但在 IE8 中完全忽略此图像。有谁知道出了什么问题?我提高了 z-index,但这似乎没有帮助。

HTML

<div id="building">
    <img src="images/someimg.png" alt="some title" height="110" width="626" />
</div>

CSS

#building {
float: left;
position: absolute;
z-index: 10000;
margin-left: 384px;
}

【问题讨论】:

  • 你有一个显示问题的小提琴吗?
  • z-index: 10000;左边距:384px;魔术数字.... agrrr
  • JSFiddle 或链接到该网站!
  • www.wmtr.com/newwebsite/en.index.html
  • @Ben : 我无法复制这个问题,从这里看起来没问题

标签: html css internet-explorer internet-explorer-8


【解决方案1】:

我将这些样式添加到内联并且有效:

<div id="container" style="position: relative !important;">
<!-- [...] -->
<div id="building" style="position: absolute !important; margin: 0px; width: 626px !important; float: none !important; height: 110px !important; right: 0px !important;">

【讨论】:

  • 在你应用内联 css 之前它没有显示建筑图像吗?
  • 问题不在于图片,而在于
    ,位置不好隐藏。
  • 啊,我看到您的内联中还包含了宽度和高度,感谢@karacas 的帮助
【解决方案2】:

一位同事帮我解决了这个问题。我必须将 DIV 的宽度和高度设置为与其中的图像大小相同。浏览器一起忽略了 div。感谢大家的帮助。

【讨论】:

    猜你喜欢
    相关资源
    最近更新 更多
    热门标签