I have a container element that should contain 3 divs (or table cells or flexboxes or something else). The container has a fixed size. Say a width of 500 pixels, a height of 100 pixels.
The middle div should be a fixed width, e.g. 100px. It should also be moved by installing css. For this example, suppose it is fixed at a distance of 225 pixels to the left.
The two remaining divs should fill the remaining space on each side (or not take up space when there is no space, even if the middle div moves outside the container border). There should be no space between the side divs and the middle div, and there should be no overlap between the side divs and the middle div.
All internal virgins are 100% high (i.e. 100 pixels).
container 500x100
----------------------------------------------------------------------------|
| |-------------------------------| |---------------------| |-------------| |
| | left, fluid | | middle, positioned | | right,fluid | |
| | | |at 225px, 100px width| | | |
| |-------------------------------| |---------------------| |-------------| |
----------------------------------------------------------------------------|
source
share