I'm trying to make a white div on top of a img.
I have tried with position absolute and relative but don't make it. I'm stuck.
The box is showing under the img container.
What am I doing wrong? :)
.img_container {
margin-left: 40px;
margin-right: 40px;
background-size: cover;
background-position: center center;
position: relative;
text-align: center;
}
.img_container .the_img img {
width: 100%;
height: 420px;
}
.img_container .the_img .container_white{
width: 900px;
height: 50px;
margin: 0 auto;
background: white;
position:absolute;
}
<div class="img_container">
<div class="the_img">
<?php echo get_the_post_thumbnail( get_the_ID(), 'large'); ?>
<div class="container_white">¨
</div>
</div>
</div>
<div class="fixfloat"></div>