I am trying to create an html5 chat client where I have a layout with a large chatwindow at the top and a small line at the bottom:
+-------------------+ | | | | | | | | +-------------------+ | | +-------------------+
How can I create a layout that always takes the size of the window? I tried a lot of things, but I either get a 100% chatwindow size, or two boxes, but not tall enough.
<html> <head> <title>Chat Example</title> <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script> <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.16/jquery-ui.js"></script> <link rel="stylesheet" type="text/css" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.17/themes/base/jquery-ui.css" /> <script type="text/javascript" src="client.js"></script> <style type="text/css"> html { overflow: hidden; } body { overflow: hidden; padding: 0; margin: 0; width: 100%; height: 100%; background: gray; } #tabs{ margin:0; padding-top:4em; padding-left:12em; padding-bottom:3em; background: red; } #container{ margin-left:5px; margin-right:5px; margin-bottom:0px; margin-top:0px; min-height:10em; position: relative; background: green; } </style> </head> <body> <div id="tabs"> <p>Bar</p> </div> <div id="container" class="ui.widget"> <p>Foo</p> </div> </body> </html>
source share