开发者

How to place an image outer of a div but on the right side

开发者 https://www.devze.com 2023-04-11 11:08 出处:网络
I try to show an image (representing a text sh开发者_StackOverflowowed vertically) on the right side of a div. As you can see on the picture below, my image is showed inside of the div. But I would li

I try to show an image (representing a text sh开发者_StackOverflowowed vertically) on the right side of a div. As you can see on the picture below, my image is showed inside of the div. But I would like to show my image on the right side of the div (outer).

How to place an image outer of a div but on the right side

Here is my 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;
}

Thank you.


Try this one.

<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

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号