2010-05-10 27 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時我測試這 - 邊界只在主圖像的周圍。

讓我知道是否解決了這個問題。

相關問題