Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
<head>
<link href="http://ajax.googleapis.com/ajax/libs/jqueryui/1/themes/smoothness/jquery-ui.css" rel="stylesheet" type="text/css" />
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1/jquery-ui.min.js"></script>
<meta name="description" content="Formatka z zakładkami i gridem" />
<meta charset=utf-8 />
<title>JS Bin</title>
</head>
<body>
  <div class="page">
    <div class="header">This header can ocupate more then one line when width resize</div>
    <div class="content"> This container should fill all rest space and can use vertical overflow if content does not fit aksjdklasdlaskdkja sjlkasjdl kasjdasñdas kñjasñkldjsklajdjasñljdlasjldasjñkjdlasñdjlsJFJSKLDJFLJsldkjflksjklfjkldsjljflskdjlfjlsj
     fill all rest space and can use vertical overflow if content does not fit aksjdklasdlaskdkja sjlkasjdl kasjdasñdas kñjasñkldjsklajdjasñljdlasjldasjñkjdlasñdjlsJFJSKLDJFLJsldkjflksjklfjkldsjljflskdjlfjlsj fill all rest space and can use vertical overflow if content does not fit aksjdklasdlaskdkja sjlkasjdl kasjdasñdas kñjasñkldjsklajdjasñljdlasjldasjñkjdlasñdjlsJFJSKLDJFLJsldkjflksjklfjkldsjljflskdjlfjlsj fill all rest space and can use vertical overflow if content does not fit aksjdklasdlaskdkja sjlkasjdl kasjdasñdas kñjasñkldjsklajdjasñljdlasjldasjñkjdlasñdjlsJFJSKLDJFLJsldkjflksjklfjkldsjljflskdjlfjlsj fill all rest space and can use vertical overflow if content does not fit aksjdklasdlaskdkja sjlkasjdl kasjdasñdas kñjasñkldjsklajdjasñljdlasjldasjñkjdlasñdjlsJFJSKLDJFLJsldkjflksjklfjkldsjljflskdjlfjlsj fill all rest space and can use vertical overflow if content does not fit aksjdklasdlaskdkja sjlkasjdl kasjdasñdas kñjasñkldjsklajdjasñljdlasjldasjñkjdlasñdjlsJFJSKLDJFLJsldkjflksjklfjkldsjljflskdjlfjlsj fill all rest space and can use vertical overflow if content does not fit aksjdklasdlaskdkja sjlkasjdl kasjdasñdas kñjasñkldjsklajdjasñljdlasjldasjñkjdlasñdjlsJFJSKLDJFLJsldkjflksjklfjkldsjljflskdjlfjlsj fill all rest space and can use vertical overflow if content does not fit aksjdklasdlaskdkja sjlkasjdl kasjdasñdas kñjasñkldjsklajdjasñljdlasjldasjñkjdlasñdjlsJFJSKLDJFLJsldkjflksjklfjkldsjljflskdjlfjlsj fill all rest space and can use vertical overflow if content does not fit aksjdklasdlaskdkja sjlkasjdl kasjdasñdas kñjasñkldjsklajdjasñljdlasjldasjñkjdlasñdjlsJFJSKLDJFLJsldkjflksjklfjkldsjljflskdjlfjlsj fill all rest space and can use vertical overflow if content does not fit aksjdklasdlaskdkja sjlkasjdl kasjdasñdas kñjasñkldjsklajdjasñljdlasjldasjñkjdlasñdjlsJFJSKLDJFLJsldkjflksjklfjkldsjljflskdjlfjlsj fill all rest space and can use vertical overflow if content does not fit aksjdklasdlaskdkja sjlkasjdl kasjdasñdas kñjasñkldjsklajdjasñljdlasjldasjñkjdlasñdjlsJFJSKLDJFLJsldkjflksjklfjkldsjljflskdjlfjlsj</div>
  </div>
</body>
</html>
 
.page {
  background-color: #ccf;
  max-height: 100%;
  width: 80%;
  overflow: hidden;
}
.header {
  background-color: #fdc;
  overflow: hidden;
}
.content{
  overflow-y: auto;
  height: 100%;
  word-wrap: break-word;
}
 
$(".page").resizable();
$(window).resize(function() {
     resizeContent();
});
$(document).load(function(){
  resizeContent();
});
function resizeContent(){
  $('.content').height($(".page").height()-$('.header').height());
}
Output

You can jump to the latest bin by adding /latest to your URL

Dismiss x
public
Bin info
anonymouspro
0viewers