Put div with image on another div

1

I'm trying to implement a solution in a div in my project, but I'm not getting it, I did a test in JSFiddle it worked, as can be seen here, by my limitation in css I'm having trouble implementing.

.produtos-wrapper{
   position:relative;
}
.imagem-mascara {
   width:100px; /* largura da imagem máscara */
   height:68px; /* altura da imagem máscara */
   position:absolute;
   top:0;
   left:0;
   background:url(http://moveissaobento.com.br/msb/imagens/tag-lancamento.png) 0 0 no-repeat; /* imagem máscara */
}
<div class="produtos-wrapper">
   <img src="http://moveissaobento.com.br/msb/imagens/img.png"width="191" height="117" border="0" />
   <div class="imagem-mascara"></div>
</div>

JSFiddle

I need to apply to my site in this case here:

Display page

See that the image is in the upper corner of the site.

    
asked by anonymous 13.02.2015 / 18:34

1 answer

2

You forgot to position: relative; in class .produtos-wrapper of your site.

.produtos-wrapper{
   position:relative;
}

This causes the divs with position: absolute; within .produtos-wrapper to have the positioning relative to it.

It works just like your example in JSFiddle.

    
13.02.2015 / 18:40