0

How to stretch the height of the content on the rest of the page and leave padding 10 pixels below. The page should not have scrolling. vh and calc is well supported by browsers, but I can’t understand how to calc remaining content height correctly

html, body {
padding: 0;
margin: 0;
}
.wrap {
  padding: 10px;
}

.content {
  padding: 10px;
  border: 1px solid #ccc;
  margin-top: 15px;
  height: calc(100vh - 82px);
}
<div class="wrap">
  <input type="search" placeholder="search">
  <div class="content"></div>
</div>
stiv
  • 43
  • 9

0 Answers0