Is it possible to make a image show before it's div background? here my code:
<li class="contest55">
<div class="view-image-fid"></div>
</li>
and in my css i have:
#latest_ideas .contest55{
background-image: url('images/image.png');
background-size: Auto 185px;
background-repeat:no-repeat;
}
I need the background start immediately under the div view-image-fid that has width 250px
tips or idea on how to do it?
solved using jquery
<script>
$( document ).ready(function()
{
$(".views-image-fid").each(function()
{
if ($(this).find(".views-image-fid").length == 1)
{
$(this).parent().css("background-position","0 190px");
}
});
});
</script>
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments