Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
<head>
<script src="https://code.jquery.com/jquery-2.1.1.min.js"></script>
  <meta charset="utf-8">
  <title>JS Bin</title>
</head>
<body>
  <div class="parent">
    <h4>window title</h4>
    <a href="#">add new row</a>
    <section>
      <h4>content</h4>
      <p>some random content which never scrolls. the list below should scroll when the section reaches the max height</p>
      <ul><li></li></ul>
    </section>
  </div>
</body>
</html>
 
.parent {
  position: fixed;
  bottom: 56px;
  overflow-y: hidden;
  top: 56px;
  
  /* demo only */
  border: 1px solid red;
  left: 50%;
  margin-left: -100px;
  width: 200px;
}
section {
  border: 1px solid blue;
  min-height: 300px;
}
ul {
  padding: 0;
  max-height: 100%;
  overflow-y: hidden;
}
li {
  background: #ccc;
  height: 50px;
  margin-top: 10px;
}
li {
  list-style: none;
}
 
$(function() {
  var ul = $('ul');
  $('a').on('click', function() {
    ul.append('<li></li>');
    return false;
  });
});
Output 300px

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

Dismiss x
public
Bin info
viveleroipro
0viewers