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="responsive-container">
  <div class="dummy"></div>
  
  <div class="wrapper">
    Lorem ipsum dolor sit amet, consectetur adipisicing elit. Eligendi minus quis facere rerum impedit maxime laudantium optio nulla architecto nam repellat.
  </div>
</div>
</body>
</html>
 
.responsive-container {
  background-color: gold;
  width: 60%;
  
  position: relative;
}
.responsive-container .dummy {
  padding-top: 100%;    /*  1:1 square */
  padding-top: 75%;     /*  w:h =  4:3 */
  padding-top: 56.25%;  /*  w:h = 16:9 */
}
.responsive-container .wrapper {
  background-color: orange;
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
}
Output 300px

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

Dismiss x
public
Bin info
anonymouspro
0viewers