Make DIV fill remainder of page vertically?

Posted by mazin k. on Stack Overflow See other posts from Stack Overflow or by mazin k.
Published on 2010-05-24T15:47:44Z Indexed on 2010/05/24 15:51 UTC
Read the original article Hit count: 340

Filed under:
|
|

I have a Google Maps app that takes up most of the page. However, I need to reserve the top-most strip of space for a menu bar. How can make the map div automatically fill its vertical space? height: 100% does not work because the top bar will then push the map past the bottom of the page.

+--------------------------------+
|           top bar  (x% tall)   |
|================================|
|              ^                 |
|              |                 |
|             div                |
|        (100%-x% tall)          |
|              |                 |
|              v                 |
+--------------------------------+

© Stack Overflow or respective owner

Related posts about html

Related posts about css