<!DOCTYPE html> | |
<style> | |
#fixed { | |
position: absolute; | |
left: 300px; | |
top: 200px; | |
width: 100px; | |
height: 100px; | |
background-color: green; | |
} | |
#fixed-child { | |
position: absolute; | |
left: 25px; | |
top: 25px; | |
width: 50px; | |
height: 50px; | |
background-color: blue; | |
} | |
</style> | |
<div id="fixed"> | |
<div id="fixed-child"></div> | |
</div> |