Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width">
  <title>JS Bin</title>
</head>
<body>
  
  <div class="parent">
    <div class="fixed"></div>
  </div>
  
  <!-- READ MORE AT https://www.w3.org/Bugs/Public/show_bug.cgi?id=16328 -->
</body>
</html>
 
.parent {
  background: #c00;
  border: 1px solid #f00;
  height: 50vh;
  position: relative;
  transform: translateY(-10%); /* THIS FUCKS THINGS UP */
}
.fixed {
  position: fixed;
  height: 20px;
  width: 20px;
  background: #0f0;
  bottom: 0;
  left: 50%;
}
Output 300px

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

Dismiss x
public
Bin info
tomasdevpro
0viewers