I'm looking to create a centered div with additional divs or spans on each side to fill the empty space.
Currently, I am using margining to center the div and you can see the implementation in this example.
HTML Code:
<div id='A>
<div id='Ad'>
</div>
</div>
CSS Styling:
#A{
z-index: 3000;
position: fixed;
width: 100%;
height: 40px;
background: rgba(0,0,0,0.05);
}
/*
Left or right side container
*/
/*
Centered div
*/
#Ad{
z-index: 3000;
width: 400px;
height: 40px;
margin-left: auto;
margin-right: auto;
border-left: solid 1px #ff0000;
border-right: solid 1px #ff0000;
}
/*
Additional container for left or right side
*/
My goal is to have one div always filling up the remaining empty space on the left, and another div doing the same on the right.
Clarification:
The central column should maintain a constant width, while the left and right columns adjust based on the window size.