The parent contains two vertical children, the first with a fixed height and the second with adaptive height according to its content

the first part knows the specific height, the content of the table part needs to be filled according to the data returned by the request, and the bottom of the table needs to be always 50px from the bottom of the document document. How is the style written, please?

tried absolute positioning + margin, may be the layout is incorrect, did not achieve the desired results.

Apr.07,2021

I don't know if you want to talk about relative document or relative visual range.

if it is a relative visual range, the outer layer can be set with absolute and bottom:0, mainly body and html, and then the inner layer can be scaled by percentage


does not quite understand the effect you want.
absolute absolute positioning will make the element out of the document stream, so the whole document should become very narrow.
if you need positioning, you can try whether relative or fixed can achieve the positioning effect you want. If not, add a div without content to occupy space for the elements that are separated from the document stream. See if you can achieve the desired effect
if you don't necessarily need positioning, directly set margin-bottom, for the second part of div, and then set a minimum height min-height, for the whole to see if this can meet the demand

.
Menu