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="container">
    <div class="child child-1">40%</div>
  </div>
  <div class="container">
    <div class="child child-2">70%</div>
  </div>
</body>
</html>
 
.container {
  height: 260px;
  background: skyblue;
  margin: 20px;
  position: relative;
}
.child {
  width: 60px;
  height: 60px;
  background: #bada55;
  position: absolute;
  -webkit-transform: translate(-50%, -50%);
  transform: translate(-50%, -50%);
  left: 50%;
}
.child-1 {
  top: 40%;
}
.child-2 {
  top: 70%;
}
Output

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

Dismiss x
public
Bin info
bobslaedepro
0viewers