Forum Moderators: not2easy
#div1{
border:2px solid #999;
margin:1em 0;
min-height:102px;
padding:.25em;
border-radius:7px;
}
#div2{
width:150px;
height:100px;
float:right;
background:url('/images/small.png') no-repeat 0 0;
}
#div2:hover{
background:url('/images/small.png') no-repeat -150px 0;
}
<div id="div1">
<div id="div2"></div>
<p>Descriptive text</p>
</div>
#div1{
border:2px solid #999;
margin:1em 0;
min-height:102px;
padding:.25em;
border-radius:7px;
}
#div2{
width:150px;
height:100px;
float:right;
background:url('/images/small.png') no-repeat 0 0;
}
#div1:hover #div2{
background:url('/images/small.png') no-repeat -150px 0;
}
<div id="div1">
<div id="div2"></div>
<p>Descriptive text</p>
</div>
<div id="div1">
<div id="div2"></div>
<p>Descriptive text</p>
</div>