How to use css to make a div box highly adaptive with content

if you give height as auto or min-height, there will be a blank at the bottom

.errors
{
    width: 390px;
    min-height: 210px;
    background:white;
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 120px;
    z-index: 100;
    margin: 150px auto;
    color: black;
}

clipboard.png

Dec.23,2021

height does not need to be specified


you can't write down the adaptive height. The reason for the blank is that you wrote top and bottom

at the same time.
Menu