2010-05-10 82 views
1

我想在页面上的图像周围创建边框,并且边框在IE8正常模式下正常工作,但填充到100%在IE8兼容模式外格的,我的CSS如下:CSS宽度在IE8兼容模式下填充,它应该在正常模式下工作

.page-layout .page-header .page-image 
{ 
    float:left; 
    vertical-align:top; 
    width:170px; 
} 

.page-layout .page-header .page-image div, 
.page-layout .page-header .page-image img 
{ 
    float:left; 
} 

.page-image-imgtop 
{ 
    background-image:url('/Style Library/images/pagecontent-image-top-bg.png'); 
    background-repeat:repeat-x; 
    height:6px; 
    float:left; 
    clear:both; 
    width:100%; 
} 

.page-image-imgleft 
{ 
    background-image:url('/Style Library/images/pagecontent-image-bg-left.png'); 
    background-repeat:repeat-y; 
    float:left; 
    text-align:right; 
    clear:both; 
} 

.page-image-imgright 
{ 
    margin-left:7px; 
    padding-right:8px; 
    background-image:url('/Style Library/images/pagecontent-image-bg-right.png'); 
    background-repeat:repeat-y; 
    background-position:top right; 
    float:left; 
    clear:both; 
} 

.page-image-imgbottom 
{ 
    background-image:url('/Style Library/images/pagecontent-image-bottom-bg.png'); 
    background-repeat:repeat-x; 
    height:6px; 
    float:left; 
    clear:both; 
    width:100%; 
} 

而下面的HTML:如果

<div class="page-image"> 
<div class="page-image-imgleft"> 
    <div class="page-image-imgtop"> 
     <img src="/Style Library/images/pagecontent-image-top-left.png" style="float:left;" /> 
     <img src="/Style Library/images/pagecontent-image-top-right.png" style="float:right" /> 
    </div> 
    <div class="page-image-imgright"> 
    <img src="MAINIMAGE.jpg" style="border-width:0px;text-align:top;" /> 
    </div> 
    <div class="page-image-imgbottom"> 
     <img src="/Style Library/images/pagecontent-image-bottom-left.png" style="float:left;" /> 
     <img src="/Style Library/images/pagecontent-image-bottom-right.png" style="float:right" /> 
    </div> 
</div> 
</div> 

回答

0

不能完全明白你想要做什么。但为什么不试图在CSS文件中添加边框? 在CSS源从MAINIMAGE.jpg标签

style="border-width:0px;text-align:top;"取出并添加这。第-图像imgright

border: 5px solid #000000; 

我没有任何问题与边界在IE 8时我测试这 - 边界只在主图像的周围。

让我知道是否解决了这个问题。

相关问题