Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
  <title>JS Bin</title>
</head>
<body>
  <div class="header"></div>
  <div class="one"></div>
  <div class="two"></div>
  <div class="three"></div>
</body>
</html>
 
.header {
  height: 75px;
}
.one, .two, .three {
  background-color: rgba(41, 101, 80, .59);
  float: left;
  margin: 0 1px 0 0; 
}
 
$(window).resize(setDim);
function setDim() {
    var windowWidth = $(window).innerWidth()- 3; //the 3 is for the 1px margin between the divs
  var windowHeight = $(window).innerHeight() - 70;
  $(".one").innerWidth(windowWidth / 3);
  $(".two").innerWidth(windowWidth / 3);
  $(".three").innerWidth(windowWidth / 3);
  
  $(".one").innerHeight(windowHeight);
  $(".two").innerHeight(windowHeight);
  $(".three").innerHeight(windowHeight);
}
setDim();
Output

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

Dismiss x
public
Bin info
anonymouspro
0viewers