How to solve the situation that the height of the parent element is 0 caused by absolute positioning and fixed positioning?

first of all, the element is highly known and located by position:fixed, but the parent element"s height is unknown, so I want the parent element to be highly adaptive. But after setting the fixed position, no matter what I do, the height of the parent element is 0.

Css
Mar.19,2021

is zero.
when the child element is positioned, it is out of the document stream.
there is nothing in the parent element. Of course, the height is zero.
when you add child elements to the parent element, the parent element will be stretched by the child element.


what you may need is to post some of the designs you intercepted. We can provide you with the basic knowledge of 0-0 solutions and ideas, which we can't solve for you. Emmmm


position:fixed is only controlled by the html element node, and only one parent is the root node.


impossible. After fixed, it is equivalent to


fixed positioning is relative to the browser. In most cases, brothers are recommended to use absolute positioning or relative positioning, but relative positioning has the problem of occupying space, so absolute positioning is better

.
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1eb3ea0-69c04.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1eb3ea0-69c04.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?