Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
<head>
<meta charset=utf-8 />
<title>JS Bin</title>
</head>
<body>
  <div class="parent">
    <h1>Element taking space</h1>
    <div class="stretch">
        <div class="col">Not much content, but needs to be stretched to the end.</div>
        <div class="col">Not much content, but needs to be stretched to the end.</div>
    </div>
  </div>
</body>
</html>
 
.parent {
  display: table;
  background-color: #eee;
  border: 1px solid black;
  width: 300px;
  height: 600px;
  
}
.stretch {
  background-color: #ddd;
  height: inherit;
}
.col {
  border-right: 1px dotted #ccc;
  box-sizing: border-box;
  float: left;
  width: 50%;
}
Output

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

Dismiss x
public
Bin info
anonymouspro
0viewers