I'm building a page with three basic elements: a header, a sidebar, and a <div>
that will contain a Google map. The header has a fixed size and full width; below that, the sidebar is on the left and has a fixed width, while the map is on the right and should expand to fill all available width. It looks something like this:
+----------------------------------------------+
| header |
+-------------+--------------------------------+
| | |
| | |
| | |
| sidebar | map |
| | |
| | |
| | |
+-------------+--------------------------------+
So far, my layout could be accomplished using this method. The problem is that I want both the map and the sidebar to take up all available vertical space too. I managed to get this working by absolutely positioning the map and the sidebar, but then I couldn't set a background-gradient on the page because the <body>
was only as tall as the header--the sidebar and map were not part of the document flow.
Is it possible to achieve this combination of fixed-size and flexible objects while leaving the <body>
with a reasonable height?