<container>
  <div>static</div> 
  <fixed>fixed</fixed>
  <div>static</div>
  <div>static</div>
  <div>static</div>
</container>
container {
  width: 500px;
  height: 400px;
  background-color: gray;
  display:flex;
}

div {
  display:flex;
  width: 100px;
  height: 100px;
  background-color: white;
  border: 1px solid black;
  text-align:center;
  align-items:center;
  justify-content:center;
}

fixed {
  display:flex;
  position:fixed;
  width: 100px;
  height: 100px;
  background-color: green;
  border: 1px solid black;
  text-align:center;
  align-items:center;
  justify-content:center;
  top: 50px;
  left: 50px;
}

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.