I created three DIVs that I wanted to appear from left to right.
<div id="middle">
<div id="middleleft"></div>
<div id="middleleftopenclose"></div>
<div id="middleright"></div>
</div>
However, DIV middleleftopenclose appears all the way on the left and not after middleleft. Why is that?
#middle {
position: relative;
height: 100%;
}
#middleleft {
width: 445px;
float: left;
}
#middleleftopenclose {
background-color:#2a2729;
position: absolute;
height: 100%;
width: 15px;
float: left;
}
#middleright {
height: 100%;
margin-left: 460px;
}
Thanks!
Float doesn’t work with
position: absolute.Try changing it toposition: relative;