I have three div elements: left, middle and right. Left and right are fixed and floating. What I want is the middle div to fill the gap in between them.
I was able to replicate the issue and fix it using percentages instead of absolute values. Since you are looking for something flexible between the two elements this should work.
#left {
width: 20%;
float: left;
background: #ccc;
}
#middle {
width: 60%;
float: left;
display: block;
background: #ffffd;
}
#right {
width: 20%;
float: right;
background: #bbb;
}
Here's a demo