I am trying to create a layout with three <div>
elements - one centered at 960px width, and the other two on each side.
My goal is to have the side divs take up all available space except for the 960px occupied by the centered div. I managed to achieve this for the right div using overflow: hidden
, but I'm facing difficulty with the left div.
<div id="left">leftt</div>
<div id="center">center</div>
<div id="right">right</div>
<style>
#center{
width: 960px;
float: left;
height: 300px;
background-color: #bbb;
}
#left{
float: left;
height: 300px;
background-color: #ccc;
width: ?;
}
#right{
float: left;
height: 300px;
background-color: #ddd;
width: ?;
}
<style>
This image illustrates what I am aiming for: https://i.stack.imgur.com/CgdLo.png