css code to make height auto adjust code example
Example: how to make div width auto adjust
.center {
display: inline-block;
position: relative;
left: 50%;
transform: translateX(-50%);
}
.center {
display: inline-block;
position: relative;
left: 50%;
transform: translateX(-50%);
}