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>
 
$(window).resize( setDim());
function setDim() {
    var windowWidth = $(document.body).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

This bin was created anonymously and its free preview time has expired (learn why). — Get a free unrestricted account

Dismiss x
public
Bin info
anonymouspro
0viewers