<!DOCTYPE html><style>
* { outline: black solid 1px; }
body {
position: relative;
display: flex;
align-items: center;
}
.abspos {
position: absolute;
max-height: 100px;
}
.green {
display: block;
width: 100px;
height: 200px;
background: green;
}
</style><body><div class="abspos"><div class="green">