I want to position one div over another div.
CSS:
.fresh_bnr_img {
float:left;
width:950px;
text-align:center;
}
.black_strip1 {
position:relative;
top:20px;
width:120px;
height:50px;
background:#000;
opacity:0.5;
z-index:999;
}
HTML:
<div class="fresh_bnr_img">
<div class="black_strip1">Home</div>
<img src="images/banner-2.jpg" width="946" height="295" alt="fresh-banner" />
</div>
The problem is that when I place the black_strip1
class on the inner div, it appears in the right place but a blank space is appearing before the next div.