I'm struggling with CSS to create scrollable "windows" with fixed header & footer and scrollable content. The accepted answer here is the nearest I have come to solving this, but this requires that one sets the height of the "content" class div.
<!DOCTYPE html>
<head>
<style>
html, body {
  height: 100%;
  margin: 0;
}
.wrapper {
  max-height: 100%;
  display: flex;
  flex-direction: column;
}
.header, .footer {
  background: silver;
}
.content {
  flex: 1;
  overflow: auto;
  background: pink;
}
</style>
</head>
<body>
<div class="wrapper">
  <div class="header">Header</div>
  <div class="content" style="height:1000px;">
    Content
  </div>
  <div class="footer">Footer</div>
</div>
</body>
My aims are: 1. If content less than body height, no scroll 2. If content is longer than body height minus header & footer, then scroll.
How to achieve this?
 
    