IE8错误 - 浮动图像上的边框和宽度

时间:2012-02-07 09:00:08

标签: css wordpress internet-explorer

奇怪的是我在IE8上有这个bug而不是在IE7上,它显示的很好:

http://www.axiscirugiadecolumna.com/

我正在使用wordpress插件进行阴影+功能区(我在阴影插件中硬编码了功能区)。边框只是css,但在IE8上,右边框不会显示,我只是不知道为什么。

我的html如下:

<div class="alignright" style="overflow:hidden;display:table;line-height:0;text-align:center;width:453px;">
   <div class="ribboncontainer">
       <div class="ribbon"></div>
       <img height="297" width="453" style="padding:0 !important; margin:0 !important; max-width:100% !important;" alt="" src="http://www.axiscirugiadecolumna.com/wp-content/uploads/2011/11/foto1.png" title="foto1" class=" size-full wp-image-143 shadow_curl">
       <br><img style="margin:0 !important;height:10px;width:100%;-moz-opacity:.75;opacity:.75;" class="shadow_img" src="http://www.axiscirugiadecolumna.com/wp-content/plugins/shadows/shadow_curl.png">
   </div>
</div>

这是在应用插件之后。内联样式由插件应用。

我的css:

.alignright, .aligncenter, .alignleft {
   margin: 5px;
   padding-right: 5px;
   float: right;
 }
 .ribbon {
   background-image: url("ribbon.png");
   bottom: 21px;
   height: 40px;
   position: absolute;
   right: -5px;
   width: 154px;
   z-index: 888;
 }
 .ribboncontainer {
    position: relative;
 }
 .shadow_curl {
    border: 6px solid #BAD5BC;/*Right border is missing in IE*/
  }

我认为即使我摆脱了功能区类和div,问题仍然存在。

2 个答案:

答案 0 :(得分:0)

删除

max-width: 100%;

style.css(第894行) img.size-auto,img.size-full,img.size-large,img.size-medium,.attachment img

答案 1 :(得分:0)

嗯,这是因为IE8(我还在IE7上测试了你的页面) - 并且两者都不支持你的文件style.css中的CSS规则“box-shadow”(第171行)。 如果你坚持使用阴影(我假设),你应该为这些浏览器使用透明的png / gif文件。请记住,IE6不支持本机png文件,因此最好使用gif。