2011-10-06 100 views
0

我試圖在div的右側顯示圖像(表示垂直顯示的文本)。正如您在下面的圖片中看到的,我的圖像顯示在div的內部。但我想在div(外部)的右側顯示我的圖像。如何在div的右側放置圖像外部的圖像

enter image description here

這裏是我的CSS:

.outer-gray 
{ 
width: auto; 
border: 1px solid #efefed; 
border-collapse: collapse; 
margin-right: 20px; 
display:block; 
background: transparent url('Images/framework-asp-net-mvc3.png') no-repeat bottom right; 
} 

謝謝。

+0

相關:[在所有四個拐角DIV的附加圖像](http://stackoverflow.com/questions/17306087/attach-images-on-all-four-corner-of-div)&[智能在所有四個角落添加角落圖像到DIV邊框的方法](http://stackoverflow.com/questions/6467063/smart-way-to-add-corner-image-to-div-border-on-all-four-角落)。 –

回答

0

試試這個。

<div class="container"> 
    a lot of content 
    <div class="outter"></div> 
</div> 
<style> 
    .container{position:relative} 
    .outter{ 
     position:absolute; 
     right:-10px; 
     bottom:0; 
     height:200px; 
     width:10px; 
     background:url(some.png) no-repeat 
    } 
</style> 
+0

你指給我正確的方向。謝謝。 – Bronzato

相關問題