Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
<head>
<meta name="description" content="Box Offset">
  <meta charset="utf-8">
  <title>Box Offset</title>
</head>
<body>
  
  <style>
    .id1 {
      position: absolute;
      top: 100px;
      left: 100px;
      width: 200px;
      height: 200px;
      background: green;
      text-align: center;
    }
    
    .id2 {
      position: absolute;
      top: 10%; left: 10%;
      width: 150px;
      height: 100px;
      background: yellow;
      text-align: center;
    }
  </style>
  <div class="id1">
    <div class="id2">box offset</div>
  <div>
  
</body>
</html>
Output

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

Dismiss x