Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
<head>
<meta name="description" content="Position fixed">
  <meta charset="utf-8">
  <title>Position fixed</title>
</head>
<body>
  
  <style>
    .id1 {
      width: 100px;
      line-height: 100px;
      background: green;
      text-align: center;
    }
    
    .id2 {
      position: fixed;
      top: 50px; left: 150px;
      width: 160px;
      line-height: 80px;
      background: yellow;
      text-align: center;
    }
    
    .id3 {
      width: 260px;
      line-height: 200px;
      background: blue;
      text-align: center;
      color: white;
    }
  </style>
  <div class="id1">base element</div>
  <div class="id2">position fixed</div>
  <div class="id3">normal flow</div>
  <div style="height: 1000px">..</div>
  
</body>
</html>
Output

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

Dismiss x