Given I have 3 divs one parent div containing two children.

I want the layout to adapt according to the total width of the browser. The parent is set to fill 100% of the available space. The right child div should be fixed width, in the example 200px, while the left div fills the remainder of the available space.

Is this at all possible to accomplish?

If so, how would you do it?

Example

1 answer

3
points
This was chosen as the best answer

This is possible, see this example: http://thechildrenshospital.org

Your parent container should not have a width but instead give it padding-right: 200px;

The remainder div should have a width: 100%;

Your right column should have float: right; margin-right: -200px; width: 200px;

Answered over 2 years ago by Artistic Abode