<!DOCTYPE html>
<style>
body {
    margin: 0;
}
.container {
    border: 1px solid;
    height: 50px;
    width: 50px;
    background-color: orange;
}
.child {
    position: relative;
    top: 20%;
    left: 20%;
    height: 10px;
    width: 10px;
    background-color: salmon;
}
</style>
<div class="container">
    <div class="child"></div>
</div>
<br>
<div class="container" style="overflow:scroll">
    <div class="child"></div>
</div>
