I am currently in the process of developing a website that needs to be responsive on all pages. The layout consists of 5 divs positioned horizontally. The three middle divs have fixed sizes - 200px, 400px, and 200px respectively. However, I am facing a challenge with the divs on the far left and far right. These two divs need to be equally sized and fill the screen regardless of the resolution at which the website is viewed. The goal is to have the middle section centered while the divs on either side expand to fill the screen. I have attempted various techniques mentioned in other discussions but most solutions only work for one side or the other, not both simultaneously. Is there anyone who might have a solution?
Here is my HTML structure:
<div id="left">
test
</div>
<div id="buttonsleft">
test
</div>
<div id="middle">
test
</div>
<div id="buttonsright">
test
</div>
<div id="right">
test
</div>
And here is my CSS styling:
#left{
float:left;
background-color:#C00;
width:15%;
height:100%;
}
#buttonsleft{
float:left;
background-color:#3F0;
width:200px;
height:100%;
}
#middle{
float:left;
background-color:#30F;
width:400px;
margin:auto;
}
#buttonsright{
float:left;
background-color:#3FF;
width:200px;
height:100%;
}
#right{
float:left;
background-color:#300;
width:15%;
height:100%;
}