Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
<head>
<meta charset=utf-8 />
<title>Div Height And Such</title>
</head>
<body>
  <div class="divOne">divOne</div>
  <div class="divTwo">divTwo</div>
  <div class="divThree">divThree</div>
  <div class="divFour">divFour</div>
  <script src="http://code.jquery.com/jquery-1.9.1.min.js"></script>
  <script>
  var width = $(window).width();
  var height = $(window).height();
  $('.divOne').css({"height": height + "px"});
  $('.divTwo').css({
    "top": height + "px",
    "height": "200px"
  });
  $('.divThree').css({
    "top": (height + 200) + "px",
    "height": "200px"
  });
  $('.divTwo').css({
    "top": (height + 400) + "px",
    "height": "200px"
  });
  </script>
</body>
</html>
Output

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

Dismiss x
public
Bin info
anonymouspro
0viewers